-
Notifications
You must be signed in to change notification settings - Fork 61
wip: swagger api docs #3882
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
base: main
Are you sure you want to change the base?
wip: swagger api docs #3882
Conversation
This creates postman collection from unit tests
this extract controllers docs into priv/static/docs.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is partly AI generated (80% ish). I am not sure what most of these codes mean but it does the job.
This is how i extract @moduledoc and @doc comments from API Controllers like workflows_controller.ex
The goal is to link these docs as description in postman collection requests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This 100% AI generated, I am not sure how useful they are. I had to ask help from AI because my formatter kept breaking when i was running mix compile.docout, Mostly the bug was related to data types and empty functions.
The issue occurred because docout is marked as runtime: false in the dependencies

Description
This PR does 2 things,
priv/static/postman.json@moduledoc, @doccomments in API controllers inpriv/static/docs.json[Just few of them for proof of concept]Validation steps
priv/static/postman.jsonmix compile.docout. Once it's done, seepriv/static/docs.jsonAdditional notes for the reviewer
The original issue request was to port lighting API docs to docs.openfn.org and See OpenFn/docs#715. Although this PR does not generate a Open API spec that can be used in docs.openfn.org, This change is 1 step closer towards that direction.
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Pre-submission checklist
:owner,:admin,:editor,:viewer)