Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI spec schemas with default value not in enums #441

Open
jlumpe opened this issue Jan 3, 2025 · 1 comment
Open

OpenAPI spec schemas with default value not in enums #441

jlumpe opened this issue Jan 3, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jlumpe
Copy link

jlumpe commented Jan 3, 2025

The following schemas in the OpenAPI spec have default value "DEFAULT", which is not one of their defined enum values:

  • v2AnnotationForAssemblyType
  • v2AnnotationForOrganelleType
  • v2AssemblyLinksReplyAssemblyLinkType
  • v2GeneLinksReplyGeneLinkType
  • v2GenomeAnnotationRequestAnnotationType

This is causing me errors when trying to generate a Python API client with OpenAPI Generator.

I'm not too familiar with the OpenAPI specification, but from what I was able to gather the value of the default property must validate against the schema (swagger.io docs, this is different than Json Schema where is is merely suggested).

Based on my understanding, the value "DEFAULT" should be added to the enum property of these schemas.

@jlumpe jlumpe added the bug Something isn't working label Jan 3, 2025
@syntheticgio
Copy link

syntheticgio commented Jan 6, 2025

Hi @jlumpe. Thanks for pointing this out. Looks like it is an internal edge case for how we generate those schemas. They actually do have DEFAULT as a value but apparently there is a conflict (I believe because 'DEFAULT' is clashing since they are all put in the same namespace - but that is just a guess at the moment).

We're working on getting that fixed (it should be fairly quick but needs to go through our internal processes and won't be done as an 'emergency' type fix). If you would like to manually patch these for the time being (to unblock yourself), here are the values:

v2AnnotationForAssemblyType

GENOME_GFF
GENOME_GBFF
RNA_FASTA
PROT_FASTA
GENOME_GTF
CDS_FASTA
ASM_STRUCT
GENOME_FASTA
SEQUENCE_REPORT

v2AnnotationForOrganelleType

GENOME_FASTA
CDS_FASTA
PROTEIN_FASTA

v2AssemblyLinksReplyAssemblyLinkType

GDV_LINK
FTP_LINK
ASSEMBLY_PUBMED
BLAST_LINK
ASSEMBLY_NUCCORE_REFSEQ
ASSEMBLY_NUCCORE_GENBANK

v2GeneLinksReplyGeneLinkType

GENE_LINK
GDV_LINK
ORTHOLOG_LINK
MCGV_LINK

v2GenomeAnnotationRequestAnnotationType

GENOME_FASTA
RNA_FASTA
PROT_FASTA

Hopefully that helps! I'll leave this ticket open until the fix is added to the code.

@syntheticgio syntheticgio self-assigned this Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants