You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered: