Skip to content
Snippets Groups Projects
Commit da5c234b authored by Johan de Klerk's avatar Johan de Klerk
Browse files

docs - added default schemas

parent 2adc0851
No related branches found
No related tags found
No related merge requests found
......@@ -73,10 +73,7 @@ func GetDocs(endpointHandlers map[string]map[string]interface{}, corePath string
}
// Add default error
docs.Components.Schemas["error"] = map[string]string{
"type": "string",
"format": "string",
}
addDefaultSchemas(docs)
var validationError error
if endpointHandlers, validationError = handler_utils.ValidateAPIEndpoints(endpointHandlers); validationError != nil {
......@@ -141,6 +138,18 @@ func GetDocs(endpointHandlers map[string]map[string]interface{}, corePath string
return docs, nil
}
func addDefaultSchemas(docs Docs) {
docs.Components.Schemas["error"] = map[string]string{
"type": "string",
"format": "string",
}
docs.Components.Schemas["string"] = map[string]string{
"type": "string",
"format": "string",
}
}
func FillParameters(docs *Docs, handler handler_utils.Handler) ([]DocParam, error) {
docParameters := []DocParam{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment