basic swagger
This commit is contained in:
105
docs/swagger.json
Normal file
105
docs/swagger.json
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is the NKode API server.",
|
||||
"title": "NKode API",
|
||||
"termsOfService": "http://nkode.example.com/terms/",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "http://nkode.example.com/support",
|
||||
"email": "support@nkode.example.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://opensource.org/licenses/MIT"
|
||||
},
|
||||
"version": "1.0"
|
||||
},
|
||||
"host": "localhost:8080",
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/create-new-customer": {
|
||||
"post": {
|
||||
"description": "Creates a new customer based on the provided policy information.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"customers"
|
||||
],
|
||||
"summary": "Create a new customer",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Customer creation data",
|
||||
"name": "NewCustomerPost",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/core.NewCustomerPost"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/core.CreateNewCustomerResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"core.CreateNewCustomerResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"customer_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"core.NKodePolicy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"distinct_attributes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"distinct_sets": {
|
||||
"type": "integer"
|
||||
},
|
||||
"expiration": {
|
||||
"description": "seconds, -1 no expiration",
|
||||
"type": "integer"
|
||||
},
|
||||
"lock_out": {
|
||||
"type": "integer"
|
||||
},
|
||||
"max_nkode_len": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_nkode_len": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"core.NewCustomerPost": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nkode_policy": {
|
||||
"$ref": "#/definitions/core.NKodePolicy"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"ApiKeyAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user