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

CLI Design for OpenAPI parser #17

Open
1 of 2 tasks
de-sh opened this issue May 29, 2019 · 4 comments
Open
1 of 2 tasks

CLI Design for OpenAPI parser #17

de-sh opened this issue May 29, 2019 · 4 comments

Comments

@de-sh
Copy link
Contributor

de-sh commented May 29, 2019

I'm submitting a

  • bug report.
  • feature request.

Current Behaviour:

Currently the openapi-parser library is imported as a python package and that is about all the facilities it provides a user. A CLI would allow for a user to utilise this as a standalone app for purposes that might be divergent from what this was originally meant to be.

Expected Behaviour:

The CLI should allow for the user to use the command hydra-openapi-parser to generate a hydraDoc. This could be as simple as:

hydra-openapi-parser parse --openapi-doc-input api_doc.yaml --hydradoc-output hydra_doc.jsonld

Do you want to work on this issue?

Yes, but I would need help with designing the CLI

@Guttz
Copy link
Contributor

Guttz commented May 30, 2019

hydra-openapi-parser parse --openapi-doc-input api_doc.yaml --hydradoc-output hydra_doc.jsonld

Setting a default for output file name would good, so it's not a mandatory param. Also short alternatives like "-i" for --openapi-doc-input and "-o" for --hydradoc-output would be handy.

@de-sh
Copy link
Contributor Author

de-sh commented Jun 1, 2019

Please take a look at https://github.com/de-sh/hydra-openapi-parser/tree/cli

Also short alternatives like "-i" for --openapi-doc-input and "-o" for --hydradoc-output would be handy.

I think we can make use of simple CLI arguments for that. I also learned that in hydrus, hydrus run == hydrus serve almost anything after hydrus will still run the server, but there must be something...

I'll make a PR if we can solve the issue with CLI...

@Guttz
Copy link
Contributor

Guttz commented Jun 4, 2019

I liked the smaller parameters, looks like it has the basic func. I find summing this up important for us to close #13, so we can add to the readme something like:

hydra-openapi-parser parse --apidoc samples/petstore_openapi.yaml --hydradoc hydra_doc_sample.py

Guess we need it to link with the package adding "entry_points" at the setup.py so we can use it as hydra-openapi-parser and have some documentation to use it.

@Mec-iS
Copy link
Contributor

Mec-iS commented Jul 2, 2019

#18 merged

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