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

Development of the Hydra OpenAPI Parser - v2 #22

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

amalthundiyil
Copy link
Contributor

@amalthundiyil amalthundiyil commented Mar 27, 2022

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.5.2 and above.

Description

  • Separated concerns by adding /parsers and /processors
  • Parsers are responsible for parsing the text of the OpenAPI Spec and extracting relevant information for creating a Hydra Object
  • Processors then use this information and act as an adapter to the hydra-python-core which then convert it to a Hydra Object
  • These Hydra objects are then used by the APIClassProcessor to finally create a relevant Hydra Class along with the other relevant "metadata" using the APIInfoProcessor and then sending it to the OpenAPIDocParser which assimilates everything to create a HydraDoc

This PR addresses a lot of the open issues in this project currently (#21 , #4 , #19) and is inspired by the Swagger Parser heavily.

Future improvements:

  • Condense the number of modules.
  • Make better use of the Adapter Pattern for working with hydra-python-core
  • Add better support for working with OpenAPI Schema Objects and JSON pointers.
  • Add support for Iri templates.

@Mec-iS
Copy link
Contributor

Mec-iS commented Mar 27, 2022

thanks for this!

- Separated concerns by adding `/parsers` and `/processors`
- Parsers are responsible for parsing the text of the OpenAPI Spec and extracting relevant information for creating a `HydraDoc`
- Processors then use this information and act as an adapter to the `hydra-python-core` which then convert it to a Hydra Object
- These Hydra objects are then used by the `APIClassProcessor` to finally create a relevant Hydra Class and then send it to the  `OpenAPIDocParser` which assimilates everything to create a `HydraDoc`
@Mec-iS Mec-iS merged commit 3293794 into HTTP-APIs:develop Apr 8, 2022
@amalthundiyil amalthundiyil deleted the parser_v2 branch April 8, 2022 16:41
@amalthundiyil amalthundiyil restored the parser_v2 branch April 8, 2022 16:41
@amalthundiyil amalthundiyil deleted the parser_v2 branch April 24, 2022 11:22
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

Successfully merging this pull request may close these issues.

2 participants