Add caching for swagger schemas

This commit is contained in:
Brendan Burns
2015-09-10 14:58:09 -07:00
parent bfc60709b1
commit d9e1a00a14
14 changed files with 185 additions and 28 deletions

View File

@@ -268,8 +268,9 @@ func GetFlagDuration(cmd *cobra.Command, flag string) time.Duration {
return d
}
func AddValidateFlag(cmd *cobra.Command) {
func AddValidateFlags(cmd *cobra.Command) {
cmd.Flags().Bool("validate", true, "If true, use a schema to validate the input before sending it")
cmd.Flags().Bool("cache-schema", true, "If true, use/store local schema files")
}
func ReadConfigDataFromReader(reader io.Reader, source string) ([]byte, error) {