API Reference
Register an OpenAPI spec
Registers a YAML or JSON OpenAPI spec. Re-posting the same specName + content is idempotent — returns the existing specId.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/mock-server/specs" \ -H "Content-Type: application/json" \ -d '{ "specName": "petstore", "specContent": "string" }'{
"specId": "4fb8206c-5754-4ab6-9515-c4f7e63a0ec3",
"specName": "string",
"specVersion": "string",
"specHash": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}