luftfartsverket / openapi-to-asciidoc

Tool for generating AsciiDoc documentation from OpenAPI Specification File
https://luftfartsverket.github.io/openapi-to-asciidoc/
MIT License
2 stars 2 forks source link

README instructions don't work for me who doesn't know Python #19

Open dustinmoris opened 2 weeks ago

dustinmoris commented 2 weeks ago

I don't know Python and when I follow the README instructions it doesn't seem to work:

First I run the pip install command:

pip3 install -U openapi-to-asciidoc

Output:

Requirement already satisfied: openapi-to-asciidoc in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (0.1.5.dev2)
Requirement already satisfied: jinja2-cli>=0.8.2 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from openapi-to-asciidoc) (0.8.2)
Requirement already satisfied: jinja2>=3.1.2 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from openapi-to-asciidoc) (3.1.4)
Requirement already satisfied: marshmallow>=3.19.0 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from openapi-to-asciidoc) (3.21.3)
Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from jinja2>=3.1.2->openapi-to-asciidoc) (2.1.5)
Requirement already satisfied: packaging>=17.0 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from marshmallow>=3.19.0->openapi-to-asciidoc) (24.1)

Then when I run the python command:

python3 openapi_to_asciidoc -j openapi.json -o openapi.adoc

I am getting this error:

/Library/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python: can't open file '/<redacted>/openapi_to_asciidoc': [Errno 2] No such file or directory

As a complete Python n00b, what do I need to do in order to use/run this generator? 😅

lfvbarcus commented 1 week ago

Hi and welcome! I think that your problem is that the path to the openapi.json file is not correct.

Your would have to provide the complete path to the openapi.json file if you are not running the openapi-to-asciidoc command from the same folder as your openapi.json file is placed in.