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

Handle FOLIO modules move away from RAMLS schemas to Swagger API and YAML files #173

Open
hudajkhan opened this issue Mar 2, 2024 · 0 comments

Comments

@hudajkhan
Copy link
Contributor

hudajkhan commented Mar 2, 2024

Context:
Our fork of FOLIO GraphQL synchronizes with the schema files from upstream FOLIO's modules by providing a mechanism for copying over JSON files from cloned upstream FOLIO modules and then using those files to generate the FOLIO GraphQL schema. (See https://github.com/sul-dlss/folio-graphql/?tab=readme-ov-file#architecture) . The commands referenced in https://github.com/sul-dlss/folio-graphql/blob/main/json-schemas/README.md assume a particular directory structure with a RAML directory at the top level with JSON files within that directory.

The FOLIO modules are moving away from using the RAML directory plus JSON schema files to document their schemas using Swagger instead. Swagger APIs can be defined using schema files in either JSON or YAML. We will need to be able to handle new Swagger related paths from which to retrieve schema files, as well as to add support for converting YAML to JSON schemas.

Example:
mod-entities-links is an example of a module that uses Swagger API instead of RAMLS.
References: https://github.com/folio-org/mod-entities-links/tree/master/src/main/resources/swagger.api . As you can see, the path for the schemas has changed. The authority schema is now in YAML: https://github.com/folio-org/mod-entities-links/blob/master/src/main/resources/swagger.api/schemas/authority-storage/authorityDto.yaml . Compare to the authority schema in JSON in a previous version of mod-inventory-storage (from where the authority classes were moved out and into mod-entities-links): https://github.com/folio-org/mod-inventory-storage/blob/v26.0.0/ramls/authorities/authority.json
Similarly https://github.com/folio-org/mod-inventory-storage/blob/v26.0.0/ramls/authorities/authorities.json seems to correspond to https://github.com/folio-org/mod-entities-links/blob/master/src/main/resources/swagger.api/schemas/authority-storage/authorityDtoCollection.yaml .

We reviewed this module while working on #169

To Dos:

  • Handle modules which now use a new Swagger API directory structure
  • Handle YAML schemas in addition to JSON schemas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant