OpenAPI spec version
What Appear Does
Why This is Useful
Example:
{
"openapi": "3.1.0",
"info": {
"title": "App API",
"version": "test-api-routes"
},
"servers": [
{
"url": "http://localhost:3000/",
"variables": {
}
}
],
"tags": [],
"paths": {
"/app-api": {
"summary": "App API data",
"parameters": [],
"post": {
"tags": [],
"summary": "Submit App Test",
"description": "This endpoint accepts a JSON object with a single 'test' field, which must be a string of exactly 5 characters. It processes the input and returns a JSON object containing a 'hello' field, also a string of 5 characters. The service ensures strict adherence to the input and output length constraints.",
"operationId": "/app-api#post",
"parameters": [],
"requestBody": {
"description": "",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Test"
}
}
}
},
"responses": {
"200": {
"description": "",
"headers": {
"Content-Type": {
"description": "The [MIME type](https://en.wikipedia.org/wiki/MIME_type) of this content",
"schema": {
"type": "string",
"maxLength": 16,
"minLength": 16
},
"example": "application/json"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Greet"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Greet": {
"type": "object",
"required": [
"hello"
],
"properties": {
"hello": {
"type": "string",
"maxLength": 5,
"minLength": 5
}
}
},
"Test": {
"type": "object",
"required": [
"test"
],
"properties": {
"test": {
"type": "string",
"maxLength": 5,
"minLength": 5
}
}
}
}
}
}More to Come
Last updated