Create a schema
POST {{baseUrl}}/apis/{{apiId}}/schemas
Creates a schema for an API. Include the following in the the request body:
type— A string value that contains the API schema's type. One of:openapi:3_1openapi:3openapi:2openapi:1raml:0_8raml:1wsdl:1wsdl:2graphqlproto:2proto:3asyncapi:2
files— An array of schema files that contains the following:path— A string value that contains the schema file's path.content— A string value that contains the schema file's stringified contents.
Request Body
{"type"=>"{{schemaType}}", "files"=>[{"path"=>"{{filePath1}}", "content"=>"{{content1}}"}, {"path"=>"{{filePath2}}", "content"=>"{{content2}}"}, {"path"=>"{{filePath3}}", "content"=>"{{content3}}"}, {"path"=>"{{filePath4}}", "content"=>"{{content4}}"}]}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Accept | string |
RESPONSES
status: Created
{"type":"proto:2","files":[{"path":"index.proto","createdBy":"557089","id":"41a3d7fd-bf9a-4053-b20e-37453962b4d6","createdAt":"2023-03-21T10:10:54.000Z","name":"index.proto","updatedBy":"557089","updatedAt":"2023-03-21T10:10:54.000Z","root":{"enabled":true}}],"createdBy":"557089","createdAt":"2023-03-21T10:10:54.000Z","id":"b4fc1bdc-6587-4f9b-95c9-f768146089b4","updatedBy":"557089","updatedAt":"2023-03-21T10:10:54.000Z"}