RicoSuter / NSwag
7,323 C#The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
My Title Specification
Located in src/NSwag.Sample.NET100/openapi.json on branch HEAD
3.0.0
JSON
4 Endpoints
5.5 KB
Operations & Route Endpoints (7)
Raw JSON Specification
{
"x-generator": "NSwag",
"openapi": "3.0.0",
"info": {
"title": "My Title",
"description": "Hello world!",
"version": "1.0.0"
},
"paths": {
"/api/Values": {
"get": {
"tags": [
"Values"
],
"operationId": "Values_GetAll",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Person"
}
}
}
}
},
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Person"
}
}
}
}
},
"204": {
"description": ""
}
}
},
"post": {
"tags": [
"Values"
],
"operationId": "Values_Post",
"requestBody": {
"x-name": "value",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": ""
}
}
}
},
"/api/Values/{id}": {
"get": {
"tags": [
"Values"
],
"operationId": "Values_Get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestEnum"
}
}
}
}
}
},
"put": {
"tags": [
"Values"
],
"operationId": "Values_Put",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"requestBody": {
"x-name": "value",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"required": true,
"x-position": 2
},
"responses": {
"200": {
"description": ""
}
}
},
"delete": {
"tags": [
"Values"
],
"operationId": "Values_Delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/api/Values/ToString({id})": {
"get": {
"tags": [
"Values"
],
"operationId": "Values_GetToString",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/api/Values/{id}/foo": {
"get": {
"tags": [
"Values"
],
"operationId": "Values_GetFooBar",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Person": {
"type": "object",
"additionalProperties": false,
"properties": {
"firstName": {
"type": "string"
},
"middleName": {
"type": "string",
"nullable": true
},
"lastName": {
"type": "string"
},
"dayOfBirth": {
"type": "string",
"format": "date-time"
}
}
},
"TestEnum": {
"type": "string",
"description": "",
"x-enumNames": [
"Foo",
"Bar"
],
"enum": [
"Foo",
"Bar"
]
}
}
}
}