Go build go build -i -o go-openapi-converter app/main.go
Type go-openapi-converter -h to learn more about the available commands
Type convert -s sample.v1.yaml -t template/standard.docx -o result.sample.docx to convert OpenAPI spec into .docx format
Type upload -c credentials.sample.json -d directory -e foo@gmail.com -f result.sample.docx to upload file into Google Drive
To learn more about each command, please type -h
Tutorial - Push result to Google Drive
Use Google Cloud Platform. If you don't have any account, please create it first.
Go to console > create new project
On menu, choose APIs & Services > choose Library
Search Google Drive API > click Enable
If this is your first time, you need to create OAuth Consent Screen. Go to APIs & Services > choose OAuth consent screen
Create new app > set user type as External, set the scope for Google APIs based on your needs > click Save
Back to APIs & Services > choose Credentials > click + Create Credentials > choose Service account
Fill up the Service account detail based on your preference > set permission based on your preference (i.e. Project Owner) > Create key in JSON format > store the result
Known Limitation
Only support for application/json based schema
Not support nested $ref
The order of endpoint between table of content and list of endpoint hasn't same yet
Numbering list does not appear on Google Docs
How-to-contribute
Fork this repository
Clone this repository into your local machine (git clone https://github.com/weisurya/go-openapi-converter)
Go to the project directory (cd go-openapi-converter)
Create a new branch (git checkout -b your-new-feature)
Try to run the code (go run app/main.go)
Make changes and add commit them
Push your branch into the fork-ed repository (git push origin your-new-feature)
Create new pull request (https://github.com/weisurya/go-openapi-converter/pulls)