Skip to content

Update OpenAPI to 3.1.1 #689

@mshriver

Description

@mshriver

Together with the python client library, update the OpenAPI spec to 3.1.1

Here is an evaluation from sonnet 4 on what the update would encompass.

I don't believe it about using a const for result instead of enum, there are specific result types to enumerate.

=== OpenAPI 3.1.1 Migration Analysis ===
Current version: 3.0.0

Features that could benefit from OpenAPI 3.1.1:

1. Nullable fields (could use JSON Schema null types): 15
   Examples:
   - Result.component
   - Result.env
   - Result.run_id
   - Result.project_id
   - Run.source
   ... and 10 more

2. Enhanced $ref usage opportunities:
   - OpenAPI 3.1.1 allows $ref in more locations
   - Could potentially use $ref for examples, descriptions, etc.

3. Schema composition opportunities:
   - OpenAPI 3.1.1 has better support for oneOf/anyOf/allOf
   - Could be used for polymorphic schemas or union types

4. JSON Schema 2020-12 features:
   - Better validation rules
   - More precise type definitions
   - Conditional schemas (if/then/else)

5. Enum fields (could use const for single values): 1
   Examples:
   - Result.result

6. Format fields (could use new JSON Schema formats): 28
   Examples:
   - Result.id: uuid
   - Result.run_id: uuid
   - Result.project_id: uuid
   - Run.id: uuid
   - Run.project_id: uuid

=== Migration Recommendations ===
1. Update openapi version to 3.1.1
2. Replace nullable: true with type: ["string", "null"] (or appropriate type)
3. Consider using JSON Schema 2020-12 features for better validation
4. Review enum usage - consider const for single values
5. Update tooling to support OpenAPI 3.1.1
6. Test thoroughly with Connexion 3.x compatibility

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions