Skip to content

feat: add Package endpoints#5

Draft
campbellcole wants to merge 7 commits intoaminya:mainfrom
blackbox-bio:main
Draft

feat: add Package endpoints#5
campbellcole wants to merge 7 commits intoaminya:mainfrom
blackbox-bio:main

Conversation

@campbellcole
Copy link
Contributor

Add the endpoints and schemas for the Packages endpoints.

Endpoints:

  • /accounts/{account}/packages:
    • GET
    • POST
  • /accounts/{account}/packages/{package}:
    • GET
    • PATCH
    • DELETE

Schemas:

  • #/components/schemas/Package

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}/packages and /accounts/{account}/packages/{package} (GET/POST/GET/PATCH/DELETE).
  • Defines request/response schemas for package creation and update payloads.
  • Introduces #/components/schemas/Package resource schema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6360 to +6362
description: The identifier (UUID) or key of the engine to filter by.
schema:
type: string
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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

Copilot uses AI. Check for mistakes.
- pypi
- tauri
- raw
- rubygems
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- rubygems
- rubygems
- null

Copilot uses AI. Check for mistakes.
- pypi
- tauri
- raw
- rubygems
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- rubygems
- rubygems
- null

Copilot uses AI. Check for mistakes.
- pypi
- tauri
- raw
- rubygems
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- rubygems
- rubygems
- null

Copilot uses AI. Check for mistakes.
application/vnd.api+json:
schema:
title: CreatePackageResponse
typ: object
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
typ: object
type: object

Copilot uses AI. Check for mistakes.
@aminya
Copy link
Owner

aminya commented Feb 10, 2026

@campbellcole Thanks for the PR. Could you address the issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants