Skip to content

OpenAPI Generator Incompatibility #414

@kellrott

Description

@kellrott

The current version of the schema seems to be incompatible with OpenAPI generator ( https://openapi-generator.tech ).

The command

openapi-generator generate -i data-repository-service-schemas/openapi/data_repository_service.openapi.yaml -g python -o client/

Fails with

 | Error count: 1, Warning count: 0
Errors:
	-attribute tags.description is not of type `string`

This seems to be caused by the $ref pointers to the markdown files in the description entries, for example https://github.com/ga4gh/data-repository-service-schemas/blob/master/openapi/data_repository_service.openapi.yaml#L30

If you add the --skip-validate-spec flag:

openapi-generator generate -i data-repository-service-schemas/openapi/data_repository_service.openapi.yaml -g python -o lib/ --skip-validate-spec

The command will continue, but it will fail to recognize some of the structures. Returning

[main] WARN  o.o.codegen.utils.ModelUtils - #/components/schemas/bulkobjects@{object_id} is not defined
[main] WARN  o.o.codegen.utils.ModelUtils - #/components/schemas/bulkobjects@access@{access_id} is not defined

This results in a codebase with some undefined types which is unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions