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

Try to generate openapi files #2

Open
swfsql opened this issue Jun 6, 2022 · 0 comments
Open

Try to generate openapi files #2

swfsql opened this issue Jun 6, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@swfsql
Copy link

swfsql commented Jun 6, 2022

Given the changes from #1, it may be possible to generate openapi files describing each method, including it's type and docs information. This should make creating/maintaining documentation much easier.


Draft notes:

  • JsonSchema
    • For structs X and Y, with X::y being Y, the X::y documentation shows up but the Y one doesn't.
    • For the mods a and b and structs a::X and b::X, their name X will collide and thus should be able to potentially be named a.X and b.X.
    • Functions from the same trait or from the same impl block could be grouped together by having the same tag. This aligns whit an improvement for grouping the methods together from each impl block in a single trait, instead of each method having it's own trait.
  • OpenAPI
    • The spec 3.0.x forbids the GET http request methods from having a json body.
      • Currently the PATCH is being used instead of the GET.
      • The spec 3.1 allows for that and is thus should be better, but there is less tooling and library support for it. So for now it's advisable to stick to the 3.0.x spec.
    • The files, assuming they will exist as artifacts and can be linked to, can be rendered by third-parties websites such as in this example.
@swfsql swfsql added the enhancement New feature or request label Jun 6, 2022
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