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

openapi spec autoconfigure for endpoints #24

Closed
jkone27 opened this issue Oct 11, 2024 · 2 comments
Closed

openapi spec autoconfigure for endpoints #24

jkone27 opened this issue Oct 11, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@jkone27
Copy link

jkone27 commented Oct 11, 2024

first and foremost thank you so much for this awesome project :)

is there a way to add openapi spec with reflection instead of having to manually configure endpoints?

https://github.com/Lanayx/Oxpecker/blob/51d8e2db9e30f6817c7e8ffafc7cc22228b385a3/src/Oxpecker.OpenApi/README.md

the whole thing of swagger/swashbuckle is also to allow contract driven development but by writing code first, openapi should be autogenerated by code, so that devs can just implement endpoints and a working contract is generated based on those and endpoint metadata..

pimbrouwers/Falco#49

i see this package is doing something similar to this: oki
https://gist.github.com/jkone27/953d4c1ecdb85b66dbee00debe934d16

@Lanayx
Copy link
Owner

Lanayx commented Oct 11, 2024

@jkone27 no, it's impossible to generate OpenApi spec using reflection, since EndpointHandler doesn't have any information about input or output type (it's type is HttpContext -> Task), that's why manual configuration is required (and then generation is based on reflection as you requested). Also, current implelentation was ported to Giraffe as is, so it will be easy to change between frameworks if needed.

@Lanayx
Copy link
Owner

Lanayx commented Oct 13, 2024

Closing as non-actionable

@Lanayx Lanayx closed this as completed Oct 13, 2024
@Lanayx Lanayx added the wontfix This will not be worked on label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants