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

feat(drs): add models #55

Open
4 tasks
Tracked by #54
pavelnikonorov opened this issue Nov 4, 2024 · 1 comment
Open
4 tasks
Tracked by #54

feat(drs): add models #55

pavelnikonorov opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels

Comments

@pavelnikonorov
Copy link
Collaborator

pavelnikonorov commented Nov 4, 2024

Add the necessary models for supporting the GA4GH Data Registry Service (DRS) API, version 1.4.0.

This issue requires addressing the following steps:

  • Create a ./lib/src/clients/drs folder for the DRS SDK client
  • Include DRS in the list of imported modules, the enumerator, and the corresponding as_str method in ./lib/src/clients/mod.rs
  • Generate models using the DRS OpenAPI v1.4 specification; refer to the SDK documentation for instructions.
  • Manually curate the generated models, ensuring that they are complete and correct; also check the DRS specification for any constraints described in plain text (e.g., in the description properties of the OpenAPI models), as these will generally not be considered during code generation

Additional context

@lilachic
Copy link
Contributor

lilachic commented Nov 8, 2024

There is some incompatibility issue between the generator and the yaml file, given the model generation command, it stopped in error state, add gave a hint to bypass validation. So maybe use in the code a Java class instead of type string 🤔

The error: -attribute tags.description is not of type 'string'

The used command: ./utils/build_models.sh https://raw.githubusercontent.com/ga4gh/data-repository-service-schemas/refs/heads/master/openapi/data_repository_service.openapi.yaml drs lib/src/clients/drs

Work around could be to add the flag --skip-validate-spe to the open API generator openapi-generator-cli generate in the script build_models.sh to generate models. That generates some files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready
Development

No branches or pull requests

2 participants