(Feat): Initial Commit
Some checks failed
Build & Test / build-test (push) Has been cancelled
Build & Test / swagger-codegen-cli (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled

This commit is contained in:
2026-07-03 19:41:31 +05:30
commit 7e940c83a7
461 changed files with 45002 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
// Code generated by go-swagger; DO NOT EDIT.
{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }}
package types
{{ $package := "types" }}
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// NewSwaggerSpec creates a new SwaggerSpec instance
func NewSwaggerSpec() *SwaggerSpec {
spec := &SwaggerSpec{
Handlers: make(map[string]map[string]bool),
}
if len(spec.Handlers) == 0 {
spec.initHandlerCache()
}
return spec
}
/*SwaggerSpec {{ if .Info }}{{ if .Info.Description }}{{.Info.Description}}{{ else }}the {{ humanize .Name }} API{{ end }}{{ end }} */
type SwaggerSpec struct {
Handlers map[string]map[string]bool
}
func ({{.ReceiverName}} *SwaggerSpec) initHandlerCache() {
{{- if .Operations }}
{{.ReceiverName}}.Handlers = make(map[string]map[string]bool)
// https://swagger.io/specification/v2/ fixed fields: GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH
{{.ReceiverName}}.Handlers["GET"] = make(map[string]bool)
{{.ReceiverName}}.Handlers["PUT"] = make(map[string]bool)
{{.ReceiverName}}.Handlers["POST"] = make(map[string]bool)
{{.ReceiverName}}.Handlers["DELETE"] = make(map[string]bool)
{{.ReceiverName}}.Handlers["OPTIONS"] = make(map[string]bool)
{{.ReceiverName}}.Handlers["HEAD"] = make(map[string]bool)
{{.ReceiverName}}.Handlers["PATCH"] = make(map[string]bool)
{{ range .Operations }}
{{.ReceiverName}}.Handlers[{{ printf "%q" (upper .Method) }}][{{ if eq .Path "/" }}""{{ else }}{{ printf "%q" (cleanPath .Path) }}{{ end }}] = true
{{- end }}
{{- end }}
}