UNPKG

fastify-openapi-glue

Version:

generate a fastify configuration from an openapi specification

111 lines 2.45 kB
openapi: 3.0.0 servers: - url: 'http://localhost/v2' info: title: Test specification description: testing the fastify openapi glue version: 0.1.0 paths: '/pathParam/{id}': get: operationId: getPathParam summary: Test path parameters parameters: - name: id in: path required: true schema: type: integer responses: '200': description: ok /queryParam: get: operationId: getQueryParam summary: Test query parameters parameters: - in: query name: int1 schema: type: integer - in: query name: int2 schema: type: integer responses: '200': description: ok /headerParam: get: operationId: getHeaderParam summary: Test header parameters parameters: - in: header name: X-Request-ID schema: type: string responses: '200': description: ok /bodyParam: post: operationId: postBodyParam summary: Test body parameters responses: '200': description: ok requestBody: content: application/json: schema: $ref: '#/components/schemas/bodyObject' required: true '/noOperationId/{id}': get: summary: Test missing operationid parameters: - name: id in: path required: true schema: type: integer responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/responseObject' /responses: get: operationId: getResponse summary: Test response serialization parameters: - in: query name: replyType schema: type: string responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/responseObject' components: schemas: bodyObject: type: object properties: str1: type: string format: custom-format required: - str1 responseObject: type: object properties: response: type: string required: - response