Update OpenAPI spec (38af0ca) - #165
Conversation
|
| allOf: | ||
| - type: object | ||
| properties: | ||
| object: | ||
| type: string | ||
| description: Indicates this is a list response. | ||
| const: list | ||
| list_metadata: | ||
| type: object | ||
| properties: | ||
| before: | ||
| type: | ||
| - string | ||
| - 'null' | ||
| description: >- | ||
| An object ID that defines your place in the list. | ||
| When the ID is not present, you are at the start | ||
| of the list. | ||
| example: authkit_oauth_resource_01HXYZ123456789ABCDEFGHIJ | ||
| after: | ||
| type: | ||
| - string | ||
| - 'null' | ||
| description: >- | ||
| An object ID that defines your place in the list. | ||
| When the ID is not present, you are at the end of | ||
| the list. | ||
| example: authkit_oauth_resource_01HXYZ987654321KJIHGFEDCBA | ||
| required: | ||
| - before | ||
| - after | ||
| description: >- | ||
| Pagination cursors for navigating between pages of | ||
| results. | ||
| - type: object | ||
| properties: | ||
| data: | ||
| type: array | ||
| description: The list of records for the current page. | ||
| items: | ||
| $ref: '#/components/schemas/AuthkitOauthResource' |
There was a problem hiding this comment.
The successful response does not require object, list_metadata, or data. OpenAPI generators may therefore expose these list-envelope fields as optional, even though clients need them to process records and pagination. Add required declarations to both allOf members, consistent with the repository's other list-response schemas.
Prompt To Fix With AI
This is a comment left during a code review.
Path: spec/open-api-spec.yaml
Line: 17560-17600
Comment:
**List fields are optional**
The successful response does not require `object`, `list_metadata`, or `data`. OpenAPI generators may therefore expose these list-envelope fields as optional, even though clients need them to process records and pagination. Add `required` declarations to both `allOf` members, consistent with the repository's other list-response schemas.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| '409': | ||
| description: '' | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| message: | ||
| type: string | ||
| description: A human-readable description of the error. | ||
| example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' |
There was a problem hiding this comment.
Conflict response is undocumented
The new 409 response has an empty description, and its only example describes an unrelated organization-not-found error. Generated API documentation therefore cannot explain which update conflict callers should handle. Document the actual conflict condition and provide a representative message.
Prompt To Fix With AI
This is a comment left during a code review.
Path: spec/open-api-spec.yaml
Line: 11381-11391
Comment:
**Conflict response is undocumented**
The new `409` response has an empty description, and its only example describes an unrelated organization-not-found error. Generated API documentation therefore cannot explain which update conflict callers should handle. Document the actual conflict condition and provide a representative message.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
🤖 I see new OpenAPI changes beep boop
Automated update from https://github.com/workos/workos/tree/38af0cabe5fd7314a2a54e277b419b3ff66b09ce
Source PRs
Changes