--- ex-b1-09-openapi-v1.yaml +++ ex-b1-09-openapi-v1.1.yaml @@ -1,29 +1,30 @@ openapi: 3.1.0 info: title: Records API - version: 1.0.0 + version: 1.1.0 paths: - /records/{record_id}: + /record/{id}: get: summary: Get a record - description: Returns one record. + description: Returns one record. Rate limiting may apply. operationId: getRecord parameters: - - name: record_id + - name: id in: path required: true schema: - type: integer - minimum: 1 + type: string responses: "200": - description: Record found + description: Record found or absent content: application/json: schema: - $ref: "#/components/schemas/Record" - "404": - description: Record not found + oneOf: + - $ref: "#/components/schemas/Record" + - type: "null" + "429": + description: Too many requests content: application/json: schema: $ref: "#/components/schemas/Problem" @@ -32,12 +33,17 @@ components: schemas: Record: type: object - required: [id, title] + required: [id, title, owner_id] properties: id: - type: integer + type: string title: type: string + owner_id: + type: string + archived_at: + type: [string, "null"] + format: date-time Problem: type: object required: [code, message]