Conversation
There was a problem hiding this comment.
Pull request overview
Adds OpenAPI path definitions and component schema documentation for the new Packages resource under the existing Keygen OpenAPI specification.
Changes:
- Adds CRUD endpoints for
/accounts/{account}/packagesand/accounts/{account}/packages/{package}(GET/POST/GET/PATCH/DELETE). - Defines request/response schemas for package creation and update payloads.
- Introduces
#/components/schemas/Packageresource schema.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description: The identifier (UUID) or key of the engine to filter by. | ||
| schema: | ||
| type: string |
There was a problem hiding this comment.
The engine filter query parameter is currently an unconstrained string with a description implying a UUID/key. Elsewhere in this spec, Package.attributes.engine is an enum (pypi, tauri, raw, rubygems, or null), so the query parameter schema/description should match those allowed values (e.g., an enum of the supported engines).
| description: The identifier (UUID) or key of the engine to filter by. | |
| schema: | |
| type: string | |
| description: The engine to filter by. One of: pypi, tauri, raw, rubygems. | |
| schema: | |
| type: string | |
| enum: | |
| - pypi | |
| - tauri | |
| - raw | |
| - rubygems |
| - pypi | ||
| - tauri | ||
| - raw | ||
| - rubygems |
There was a problem hiding this comment.
engine is documented as allowing null (type includes "null"), but the enum does not include null, so null will be rejected by schema validation despite the description. Add null to the enum (or model this with oneOf/nullable depending on OpenAPI version) so the schema matches the documented behavior.
| - rubygems | |
| - rubygems | |
| - null |
| - pypi | ||
| - tauri | ||
| - raw | ||
| - rubygems |
There was a problem hiding this comment.
engine is documented as allowing null (type includes "null"), but the enum does not include null, so null will be rejected by schema validation despite the description. Add null to the enum (or model this with oneOf/nullable depending on OpenAPI version) so the schema matches the documented behavior.
| - rubygems | |
| - rubygems | |
| - null |
| - pypi | ||
| - tauri | ||
| - raw | ||
| - rubygems |
There was a problem hiding this comment.
attributes.engine is documented as allowing null (type includes "null"), but the enum omits null, making null invalid under schema validation. Update the enum/schema so it actually permits null as described.
| - rubygems | |
| - rubygems | |
| - null |
| application/vnd.api+json: | ||
| schema: | ||
| title: CreatePackageResponse | ||
| typ: object |
There was a problem hiding this comment.
Response schema for createPackage uses typ: object instead of type: object, which makes the OpenAPI schema invalid and may break codegen/validation for this operation. Rename typ to type.
| typ: object | |
| type: object |
|
@campbellcole Thanks for the PR. Could you address the issues? |
Add the endpoints and schemas for the Packages endpoints.
Endpoints:
/accounts/{account}/packages:/accounts/{account}/packages/{package}:Schemas:
#/components/schemas/Package