Skip to content

Some examples are using invalid OpenAPI 3.0.x #1976

Description

@jamietanna

I.e. if trying to generate all types for https://github.com/oapi-codegen/oapi-codegen/tree/main/examples/client this fails with:

error generating code: error generating type definitions: error generating Go types for component schemas: error converting Schema Unreferenced to Go type: error generating Go schema for property 'id': error resolving primitive type: unhandled Schema type: &[int]

This is because we've got an invalid schema type. Via vacuum:

api.yaml:47:11                                                     | error    | unknown schema type: `int`                                                               | oas-schema-check           | Schemas              | $.components.schemas['Unreferenced'].properties['id'].type

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions