A mix of anticipation and dread washes over me as I open a new inbound email with an attached specification file. The API request bodies lack essential details: the actual properties of the HTTP call, making it impossible to determine expectations and behavior.
Let’s look at this example: 1 openapi: 3.0.0 info: title: Sample API version: 1.0.0 paths: /data: post: summary: Upload user data requestBody: required: true content: application/json: schema: type: object properties: name: type: string age: type: integer email: type: string responses: '200': description: Successful response
You rush to add an example to your OpenAPI spec: parameters: - name: id in: path required: true schema: type: string example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b description: The user id.