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

generate openApi or swagger #173

Open
dufoli opened this issue Oct 12, 2024 · 0 comments
Open

generate openApi or swagger #173

dufoli opened this issue Oct 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dufoli
Copy link
Owner

dufoli commented Oct 12, 2024

generate open api r swagger from api apexrest.
SELECT Id, Body FROM ApexClass WHERE NamespacePrefix = null
then parse with small tokenizer lexer to get method with annotation and produce the openapi file
for that rad return, param of method and if void is returned => find if we can found : res.responseBody = Blob.valueOf(JSON.serialize(results)); => find declaration of results.
for query param look for params.get('%s') inside body of method
it will be mostly regexp but better than nothing

alternative is to do it in apex, and propose to install the class.
https://www.educative.io/answers/how-to-write-a-yaml-file-for-swagger-ui

@dufoli dufoli added the enhancement New feature or request label Oct 12, 2024
@dufoli dufoli self-assigned this Oct 12, 2024
@dufoli dufoli added this to the 1.30 milestone Oct 12, 2024
@dufoli dufoli modified the milestones: 1.30, 1.31 Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant