~
My company currently use Swagger 2 to document API.
I want to work with OpenAPI 3 but too lazy to convert (for now of course).
So step by step:
YAMLJSONOnly step 1 is manual, aka I write my API spec completely with my hand (no auto gen from code). The others can be done with tools:
# Convert
# go install github.com/mikefarah/yq/v4@latest
yq -o=json '.' ./docs/swagger.yaml > ./docs/swagger.json
# Format
bunx prettier --write ./docs/swagger.yaml ./docs/swagger.json