pejhancctv/docs/swagger.json

116 lines
3.2 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "This is a sample server celler server.",
"title": "Swagger Example API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"host": "localhost:8000",
"paths": {
"/users/": {
"post": {
"description": "Send UserModel",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"register"
],
"summary": "Register User",
"parameters": [
{
"description": "User Model",
"name": "user",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.User"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.User"
}
},
"400": {
"description": "Bad Request"
}
}
}
}
},
"definitions": {
"models.User": {
"type": "object",
"properties": {
"birthDay": {
"type": "string"
},
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"is_removed": {
"type": "boolean"
},
"last_name": {
"type": "string"
},
"national_code": {
"type": "string"
},
"password": {
"type": "string"
},
"postCode": {
"type": "string"
},
"removed_at": {
"type": "string"
},
"role": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"username": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"BasicAuth": {
"type": "basic"
}
},
"externalDocs": {
"description": "OpenAPI",
"url": "https://swagger.io/resources/open-api/"
}
}