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

Improve OpenAPI Documentation: error codes #4144

Open
splitbrain opened this issue Jan 12, 2024 · 0 comments
Open

Improve OpenAPI Documentation: error codes #4144

splitbrain opened this issue Jan 12, 2024 · 0 comments

Comments

@splitbrain
Copy link
Collaborator

Currently the getErrorCodes() method in the OpenAPIGenerator is used to create a simple list of error codes found in the APICore class. It is very simple and just uses a bunch of regular expressions.

There are different things that could be improved:

  • use the PHP Tokenizer to parse the class
  • also find error codes thrown in remote plugins
  • maybe generate different response schemas for each registered call showing exactly the codes that a function might throw (this might be too complex as it would require a nearly complete static analysis)

Note: any implementation should not introduce any additional large dependencies to the code base. The simpler and more elegant the better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant