Ai
1 Star 0 Fork 0

KathentGitee/go-swagger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
embedded_spec.go 8.16 KB
一键复制 编辑 原始数据 按行查看 历史
Ivan Porto Carrero 提交于 2018-12-23 03:25 +08:00 . update vendor and regen examples
// Code generated by go-swagger; DO NOT EDIT.
package restapi
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
"application/keyauth.api.v1+json"
],
"produces": [
"application/keyauth.api.v1+json"
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"title": "keyauth debug",
"version": "0.3.0"
},
"basePath": "/api",
"paths": {
"/customers": {
"get": {
"tags": [
"customers"
],
"summary": "Get a customerId given an SSN",
"operationId": "getId",
"parameters": [
{
"name": "info",
"in": "body",
"schema": {
"$ref": "#/definitions/social_id"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/customer"
}
},
"401": {
"description": "unauthorized",
"schema": {
"$ref": "#/definitions/error"
}
},
"404": {
"description": "resource not found",
"schema": {
"$ref": "#/definitions/error"
}
},
"default": {
"description": "error",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"customers"
],
"summary": "Create a new customer to track",
"operationId": "create",
"parameters": [
{
"name": "info",
"in": "body",
"schema": {
"$ref": "#/definitions/customer"
}
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"$ref": "#/definitions/customer"
}
},
"default": {
"description": "error",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
}
},
"definitions": {
"customer": {
"type": "object",
"required": [
"customerId",
"name",
"surname",
"ssn",
"fipsCode"
],
"properties": {
"agentId": {
"description": "agent associated with this customer",
"type": "integer",
"format": "int32"
},
"customerId": {
"description": "internal identifier of a customer",
"type": "integer",
"format": "int64",
"readOnly": true
},
"fipsCode": {
"type": "string",
"format": "string",
"minLength": 1
},
"name": {
"type": "string",
"format": "string",
"minLength": 1
},
"ssn": {
"description": "Lookup identifier to find a customer in the system",
"type": "string",
"format": "string",
"minLength": 11
},
"surname": {
"type": "string",
"format": "string",
"minLength": 1
}
}
},
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"fields": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"principal": {
"type": "string"
},
"social_id": {
"type": "object",
"required": [
"ssn"
],
"properties": {
"ssn": {
"type": "string",
"format": "string",
"minLength": 11
}
}
}
},
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-token",
"in": "header"
}
},
"security": [
{
"key": null
}
]
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
"application/keyauth.api.v1+json"
],
"produces": [
"application/keyauth.api.v1+json"
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"title": "keyauth debug",
"version": "0.3.0"
},
"basePath": "/api",
"paths": {
"/customers": {
"get": {
"tags": [
"customers"
],
"summary": "Get a customerId given an SSN",
"operationId": "getId",
"parameters": [
{
"name": "info",
"in": "body",
"schema": {
"$ref": "#/definitions/social_id"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/customer"
}
},
"401": {
"description": "unauthorized",
"schema": {
"$ref": "#/definitions/error"
}
},
"404": {
"description": "resource not found",
"schema": {
"$ref": "#/definitions/error"
}
},
"default": {
"description": "error",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"customers"
],
"summary": "Create a new customer to track",
"operationId": "create",
"parameters": [
{
"name": "info",
"in": "body",
"schema": {
"$ref": "#/definitions/customer"
}
}
],
"responses": {
"201": {
"description": "created",
"schema": {
"$ref": "#/definitions/customer"
}
},
"default": {
"description": "error",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
}
},
"definitions": {
"customer": {
"type": "object",
"required": [
"customerId",
"name",
"surname",
"ssn",
"fipsCode"
],
"properties": {
"agentId": {
"description": "agent associated with this customer",
"type": "integer",
"format": "int32"
},
"customerId": {
"description": "internal identifier of a customer",
"type": "integer",
"format": "int64",
"readOnly": true
},
"fipsCode": {
"type": "string",
"format": "string",
"minLength": 1
},
"name": {
"type": "string",
"format": "string",
"minLength": 1
},
"ssn": {
"description": "Lookup identifier to find a customer in the system",
"type": "string",
"format": "string",
"minLength": 11
},
"surname": {
"type": "string",
"format": "string",
"minLength": 1
}
}
},
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"fields": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"principal": {
"type": "string"
},
"social_id": {
"type": "object",
"required": [
"ssn"
],
"properties": {
"ssn": {
"type": "string",
"format": "string",
"minLength": 11
}
}
}
},
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-token",
"in": "header"
}
},
"security": [
{
"key": []
}
]
}`))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kathent/go-swagger.git
git@gitee.com:kathent/go-swagger.git
kathent
go-swagger
go-swagger
v0.19.0

搜索帮助