Skip to content

Instantly share code, notes, and snippets.

@soltysh
Created February 15, 2019 09:52
Show Gist options
  • Save soltysh/787f8246e2e1de6a810a863547a8b42f to your computer and use it in GitHub Desktop.
Save soltysh/787f8246e2e1de6a810a863547a8b42f to your computer and use it in GitHub Desktop.
func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.",
Type: v1.Duration{}.OpenAPISchemaType(),
Format: v1.Duration{}.OpenAPISchemaFormat(),
},
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment