OpenAPI
Read an OpenAPI or Swagger document, list its operations and check a request or a response against it. Typical uses: test that a web service answers as documented, check a request before sending it.
openapi infoopenapi operationsopenapi operationsopenapi resolveopenapi resolveopenapi check_requestopenapi check_requestopenapi check_responseopenapi check_response
openapi info <document>
Description
A summary of the document: format, spec_version, title, version, servers (with the default values of their variables), paths, operations, schemas, security_schemes, tags, and webhooks in 3.1
A summary of the document: format, spec_version, title, version, servers (with the default values of their variables), paths, operations, schemas, security_schemes, tags, and webhooks in 3.1
Parameters
document: The OpenAPI text (JSON or YAML) or the path of a file - String - required
document: The OpenAPI text (JSON or YAML) or the path of a file - String - required
admin
openapi info "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}"
mentdb
{"format": "openapi", "spec_version": "3.0.3", "title": "Shop", "version": "1.0.0", "servers": ["https://api.shop.test/v1"], "paths": 2, "operations": 3, "schemas": ["Item"], "security_schemes": ["key"], "tags": []}
OpenAPI 3.1 in YAML with a webhook
admin
openapi info "openapi: 3.1.0 info: title: Hooks version: '2' paths: {} webhooks: newOrder: post: requestBody: content: application/json: schema: type: [object, 'null'] responses: '200': description: ok"
mentdb
{"format": "openapi", "spec_version": "3.1.0", "title": "Hooks", "version": "2", "servers": ["/"], "paths": 0, "operations": 0, "schemas": [], "security_schemes": [], "tags": [], "webhooks": ["newOrder"]}
the Petstore example of the OpenAPI Initiative, from a file (fixed result: a real run of the test)
admin
openapi info "tmp/petstore-expanded.yaml"
mentdb
{"format": "openapi", "spec_version": "3.0.0", "title": "Swagger Petstore", "version": "1.0.0", "servers": ["https://petstore.swagger.io/v2"], "paths": 2, "operations": 4, "schemas": ["Pet", "NewPet", "Error"], "security_schemes": [], "tags": []}
not an OpenAPI document
admin
openapi info "{\"name\": \"x\"}"
mentdb
ERROR: Sorry, an error appears (the document is not an OpenAPI document: no 'openapi' or 'swagger' field).
openapi operations <document>
Description
The operations: method, path, operation_id, summary, tags, deprecated, parameters (name, in, required, type), request_body (required, content_types), responses (status, description, content_types), security (the alternatives of scheme names)
The operations: method, path, operation_id, summary, tags, deprecated, parameters (name, in, required, type), request_body (required, content_types), responses (status, description, content_types), security (the alternatives of scheme names)
Parameters
document: The OpenAPI text or the path of a file - String - required
document: The OpenAPI text or the path of a file - String - required
admin
openapi operations "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}"
mentdb
[{"method": "GET", "path": "/items", "operation_id": "listItems", "summary": null, "tags": ["items"], "deprecated": false, "parameters": [{"name": "limit", "in": "query", "required": false, "type": "integer"}, {"name": "tags", "in": "query", "required": false, "type": "array of string"}], "request_body": null, "responses": [{"status": "200", "description": "The items", "content_types": ["application/json"]}], "security": []}, {"method": "POST", "path": "/items", "operation_id": "addItem", "summary": null, "tags": ["items"], "deprecated": false, "parameters": [], "request_body": {"required": true, "content_types": ["application/json"]}, "responses": [{"status": "201", "description": "Created", "content_types": []}], "security": [["key"]]}, {"method": "GET", "path": "/items/{id}", "operation_id": "getItem", "summary": null, "tags": [], "deprecated": false, "parameters": [{"name": "id", "in": "path", "required": true, "type": "integer"}], "request_body": null, "responses": [{"status": "200", "description": "One item", "content_types": ["application/json"]}, {"status": "404", "description": "Not found", "content_types": []}], "security": []}]
openapi operations <document> <params>
Description
The operations with filters: tag, method, path_prefix
The operations with filters: tag, method, path_prefix
Parameters
document: The OpenAPI text or the path of a file - String - required
params: The parameters as JSON - String - required
document: The OpenAPI text or the path of a file - String - required
params: The parameters as JSON - String - required
admin
openapi operations "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"tag\": \"items\", \"method\": \"post\"}"
mentdb
[{"method": "POST", "path": "/items", "operation_id": "addItem", "summary": null, "tags": ["items"], "deprecated": false, "parameters": [], "request_body": {"required": true, "content_types": ["application/json"]}, "responses": [{"status": "201", "description": "Created", "content_types": []}], "security": [["key"]]}]
Used in use cases (1 recipe)
API & database integrator › Check orders against the OpenAPI document of a partner before sending them
API & database integrator › Check orders against the OpenAPI document of a partner before sending them
openapi resolve <document>
Description
The document with its local $ref replaced by what they point to. A remote $ref, or a $ref inside itself (a recursive schema), stays as it is
The document with its local $ref replaced by what they point to. A remote $ref, or a $ref inside itself (a recursive schema), stays as it is
Parameters
document: The OpenAPI text or the path of a file - String - required
document: The OpenAPI text or the path of a file - String - required
admin
openapi resolve "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}"
mentdb
{"openapi": "3.0.3", "info": {"title": "Shop", "version": "1.0.0"}, "servers": [{"url": "https://api.shop.test/v1"}], "paths": {"/items": {"get": {"operationId": "listItems", "tags": ["items"], "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 50}}, {"name": "tags", "in": "query", "schema": {"type": "array", "items": {"type": "string"}}}], "responses": {"200": {"description": "The items", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "object", "required": ["name", "price"], "properties": {"id": {"type": "integer", "readOnly": true}, "name": {"type": "string", "maxLength": 20}, "price": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "note": {"type": "string", "nullable": true}}}}}}}}}, "post": {"operationId": "addItem", "tags": ["items"], "security": [{"key": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["name", "price"], "properties": {"id": {"type": "integer", "readOnly": true}, "name": {"type": "string", "maxLength": 20}, "price": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "note": {"type": "string", "nullable": true}}}}}}, "responses": {"201": {"description": "Created"}}}}, "/items/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer"}}], "get": {"operationId": "getItem", "responses": {"200": {"description": "One item", "content": {"application/json": {"schema": {"type": "object", "required": ["name", "price"], "properties": {"id": {"type": "integer", "readOnly": true}, "name": {"type": "string", "maxLength": 20}, "price": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "note": {"type": "string", "nullable": true}}}}}}, "404": {"description": "Not found"}}}}}, "components": {"securitySchemes": {"key": {"type": "apiKey", "in": "header", "name": "X-API-Key"}}, "schemas": {"Item": {"type": "object", "required": ["name", "price"], "properties": {"id": {"type": "integer", "readOnly": true}, "name": {"type": "string", "maxLength": 20}, "price": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "note": {"type": "string", "nullable": true}}}}}}
openapi resolve <document> <params>
Description
Resolve with parameters: pointer (a JSON pointer, ex: /components/schemas/Pet; ~1 for a / in a path), max_depth (64, up to 500), max_refs (10000, up to 100000)
Resolve with parameters: pointer (a JSON pointer, ex: /components/schemas/Pet; ~1 for a / in a path), max_depth (64, up to 500), max_refs (10000, up to 100000)
Parameters
document: The OpenAPI text or the path of a file - String - required
params: The parameters as JSON - String - required
document: The OpenAPI text or the path of a file - String - required
params: The parameters as JSON - String - required
admin
openapi resolve "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"pointer\": \"/paths/~1items/get/responses/200/content/application~1json/schema\"}"
mentdb
{"type": "array", "items": {"type": "object", "required": ["name", "price"], "properties": {"id": {"type": "integer", "readOnly": true}, "name": {"type": "string", "maxLength": 20}, "price": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "note": {"type": "string", "nullable": true}}}}
a pointer to nothing
admin
openapi resolve "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"pointer\": \"/components/schemas/Order\"}"
mentdb
ERROR: Sorry, an error appears (the $ref '#/components/schemas/Order' points to nothing).
openapi check_request <document> <request>
Description
Check a request: {method, path (with the query if any), query (object), headers (object), cookies (object), content_type, body (JSON) or body_text (raw text)}. The path may start with the path of a server (/v1). Returns {valid, operation_id, method, path_template, content_type, path_params, query, headers, cookies (the typed values), error_count, errors: [{in, name, message}]}; in the body, name is a JSON pointer
Check a request: {method, path (with the query if any), query (object), headers (object), cookies (object), content_type, body (JSON) or body_text (raw text)}. The path may start with the path of a server (/v1). Returns {valid, operation_id, method, path_template, content_type, path_params, query, headers, cookies (the typed values), error_count, errors: [{in, name, message}]}; in the body, name is a JSON pointer
Parameters
document: The OpenAPI text or the path of a file - String - required
request: The request as JSON - String - required
document: The OpenAPI text or the path of a file - String - required
request: The request as JSON - String - required
admin
openapi check_request "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"GET\", \"path\": \"/v1/items?limit=10&tags=pen&tags=blue\"}"
mentdb
{"valid": true, "operation_id": "listItems", "method": "GET", "path_template": "/items", "path_params": {}, "query": {"limit": 10, "tags": ["pen", "blue"]}, "headers": {}, "cookies": {}, "error_count": 0, "errors": []}
a limit out of range
admin
openapi check_request "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"GET\", \"path\": \"/items?limit=500\"}"
mentdb
{"valid": false, "operation_id": "listItems", "method": "GET", "path_template": "/items", "path_params": {}, "query": {"limit": 500}, "headers": {}, "cookies": {}, "error_count": 1, "errors": [{"in": "query", "name": "limit", "message": "must be <= 50"}]}
a body: read-only id, too long name, price 0 while it must be > 0, and no API key
admin
openapi check_request "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"POST\", \"path\": \"/items\", \"body\": {\"id\": 4, \"name\": \"A very long name for a pen\", \"price\": 0}}"
mentdb
{"valid": false, "operation_id": "addItem", "method": "POST", "path_template": "/items", "content_type": "application/json", "path_params": {}, "query": {}, "headers": {}, "cookies": {}, "error_count": 4, "errors": [{"in": "body", "name": "/id", "message": "is read-only: it must not be sent in a request"}, {"in": "body", "name": "/name", "message": "must have at most 20 characters"}, {"in": "body", "name": "/price", "message": "must be > 0"}, {"in": "security", "name": "", "message": "no credentials for the security of the operation (key)"}]}
a valid body as raw text
admin
openapi check_request "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"POST\", \"path\": \"/items\", \"headers\": {\"X-API-Key\": \"k-123\", \"Content-Type\": \"application/json; charset=utf-8\"}, \"body_text\": \"{\\"name\\": \\"Pen\\", \\"price\\": 1.5, \\"note\\": null}\"}"
mentdb
{"valid": true, "operation_id": "addItem", "method": "POST", "path_template": "/items", "content_type": "application/json", "path_params": {}, "query": {}, "headers": {}, "cookies": {}, "error_count": 0, "errors": []}
a method that the path does not have
admin
openapi check_request "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"DELETE\", \"path\": \"/items/7\"}"
mentdb
{"valid": false, "operation_id": null, "method": "DELETE", "path_template": "/items/{id}", "path_params": {}, "query": {}, "headers": {}, "cookies": {}, "error_count": 1, "errors": [{"in": "method", "name": "DELETE", "message": "is not allowed on /items/{id} (allowed: GET)"}]}
openapi check_request <document> <request> <params>
Description
Check a request with the parameter check_security (true by default; false: the credentials are not looked for)
Check a request with the parameter check_security (true by default; false: the credentials are not looked for)
Parameters
document: The OpenAPI text or the path of a file - String - required
request: The request as JSON - String - required
params: The parameters as JSON - String - required
document: The OpenAPI text or the path of a file - String - required
request: The request as JSON - String - required
params: The parameters as JSON - String - required
admin
openapi check_request "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"POST\", \"path\": \"/items\", \"body\": {\"name\": \"Pen\", \"price\": 2}}" "{\"check_security\": false}"
mentdb
{"valid": true, "operation_id": "addItem", "method": "POST", "path_template": "/items", "content_type": "application/json", "path_params": {}, "query": {}, "headers": {}, "cookies": {}, "error_count": 0, "errors": []}
Used in use cases (1 recipe)
API & database integrator › Check orders against the OpenAPI document of a partner before sending them
API & database integrator › Check orders against the OpenAPI document of a partner before sending them
openapi check_response <document> <response>
Description
Check a response: {method, path, status, headers, content_type, body or body_text}. The status is looked for exactly, then as 2XX, then default. Returns {valid, operation_id, method, path_template, status, response (the key found), content_type, error_count, errors}
Check a response: {method, path, status, headers, content_type, body or body_text}. The status is looked for exactly, then as 2XX, then default. Returns {valid, operation_id, method, path_template, status, response (the key found), content_type, error_count, errors}
Parameters
document: The OpenAPI text or the path of a file - String - required
response: The response as JSON - String - required
document: The OpenAPI text or the path of a file - String - required
response: The response as JSON - String - required
admin
openapi check_response "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"GET\", \"path\": \"/items/7\", \"status\": 200, \"body\": {\"id\": 7, \"name\": \"Pen\", \"price\": 1.2}}"
mentdb
{"valid": true, "operation_id": "getItem", "method": "GET", "path_template": "/items/{id}", "status": "200", "response": "200", "content_type": "application/json", "error_count": 0, "errors": []}
a missing field
admin
openapi check_response "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"GET\", \"path\": \"/items/7\", \"status\": 200, \"body\": {\"id\": 7, \"name\": \"Pen\"}}"
mentdb
{"valid": false, "operation_id": "getItem", "method": "GET", "path_template": "/items/{id}", "status": "200", "response": "200", "content_type": "application/json", "error_count": 1, "errors": [{"in": "body", "name": "/price", "message": "is required"}]}
a status that the document does not list
admin
openapi check_response "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"GET\", \"path\": \"/items/7\", \"status\": 500}"
mentdb
{"valid": false, "operation_id": "getItem", "method": "GET", "path_template": "/items/{id}", "status": "500", "response": null, "error_count": 1, "errors": [{"in": "status", "name": "500", "message": "is not a documented response (documented: 200, 404)"}]}
openapi check_response <document> <response> <params>
Description
Check a response (no parameter is defined yet: give {})
Check a response (no parameter is defined yet: give {})
Parameters
document: The OpenAPI text or the path of a file - String - required
response: The response as JSON - String - required
params: The parameters as JSON - String - required
document: The OpenAPI text or the path of a file - String - required
response: The response as JSON - String - required
params: The parameters as JSON - String - required
admin
openapi check_response "{\"openapi\": \"3.0.3\", \"info\": {\"title\": \"Shop\", \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"https://api.shop.test/v1\"}], \"paths\": {\"/items\": {\"get\": {\"operationId\": \"listItems\", \"tags\": [\"items\"], \"parameters\": [{\"name\": \"limit\", \"in\": \"query\", \"schema\": {\"type\": \"integer\", \"minimum\": 1, \"maximum\": 50}}, {\"name\": \"tags\", \"in\": \"query\", \"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}], \"responses\": {\"200\": {\"description\": \"The items\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"$ref\": \"#/components/schemas/Item\"}}}}}}}, \"post\": {\"operationId\": \"addItem\", \"tags\": [\"items\"], \"security\": [{\"key\": []}], \"requestBody\": {\"required\": true, \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"responses\": {\"201\": {\"description\": \"Created\"}}}}, \"/items/{id}\": {\"parameters\": [{\"name\": \"id\", \"in\": \"path\", \"required\": true, \"schema\": {\"type\": \"integer\"}}], \"get\": {\"operationId\": \"getItem\", \"responses\": {\"200\": {\"description\": \"One item\", \"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Item\"}}}}, \"404\": {\"description\": \"Not found\"}}}}}, \"components\": {\"securitySchemes\": {\"key\": {\"type\": \"apiKey\", \"in\": \"header\", \"name\": \"X-API-Key\"}}, \"schemas\": {\"Item\": {\"type\": \"object\", \"required\": [\"name\", \"price\"], \"properties\": {\"id\": {\"type\": \"integer\", \"readOnly\": true}, \"name\": {\"type\": \"string\", \"maxLength\": 20}, \"price\": {\"type\": \"number\", \"minimum\": 0, \"exclusiveMinimum\": true}, \"note\": {\"type\": \"string\", \"nullable\": true}}}}}}" "{\"method\": \"GET\", \"path\": \"/items/7\", \"status\": 404}" "{}"
mentdb
{"valid": true, "operation_id": "getItem", "method": "GET", "path_template": "/items/{id}", "status": "404", "response": "404", "error_count": 0, "errors": []}
Used in use cases (1 recipe)
API & database integrator › Check orders against the OpenAPI document of a partner before sending them
API & database integrator › Check orders against the OpenAPI document of a partner before sending them
