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

reference libraries do not provide access to CURIEMap and InformationProvider for CURIE resolution #771

Open
schristley opened this issue Mar 3, 2024 · 2 comments
Milestone

Comments

@schristley
Copy link
Member

The singleton objects CURIEMap and InformationProvider are not obviously accessible to external tools. To use them in order to resolve CURIEs would require access and parsing of the schema file. The larger question though is should external tools perform their own CURIE resolution, or should the reference libraries provide functions to do that?

My initial thought is that encapsulation of the details about CURIEMap and InformationProvider is likely a good thing. That allows the structure of those objects to change over time if needed. A single function that accepts a CURIE string and returns a fully qualified URL would be base functionality. Maybe some parameters are needed if there are multiple providers to choose from? I can think of a couple other convenience functions that might be helpful too.

@bussec
Copy link
Member

bussec commented Mar 4, 2024

I agree that such a functionality would be useful, as it will provide a reference implementation showing how we expect the CURIE resolution to work. @schristley What exactly makes CURIEMap and InformationProvider singleton objects according to OpenAPI?

@schristley
Copy link
Member Author

What exactly makes CURIEMap and InformationProvider singleton objects according to OpenAPI?

Nothing, that's just the terminology I use. You might call them global instances. OpenAPI doesn't support things like that in its spec, if you were to include the AIRR schema file as-is in an OpenAPI file, it would generate errors. That's because OpenAPI expects to see JSON schema definitions, i.e. contains stuff like type: object and properties: and so on.

The Info object at the top schema file is another example, that's not supported by OpenAPI either but it's useful documentation. The reason the ADC API spec works is because it doesn't include the AIRR schema file as whole, instead it includes only the specific schema definitions like Repertoire, Rearrangement and so on.

@javh javh added this to the AIRR 2.1 milestone Sep 9, 2024
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

3 participants