-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 docs #40162
OpenAPI docs #40162
Conversation
d54f56f
to
14177fb
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, and I like the tests, but I'm not sure what the exact goal is, could you put in link to the issue so I can know exactly what this is solving?
I am also lacking some context for parsing out what a few of your pr's comments mean:
- I don't understand why clj-kondo refuses to see those 4 endpoints by name
Which 4?
- There is no security scheme defined, so it says "no authentication" everywhere
Do we need to define one? What's everywhere?
- If we have POST/PUT requests having query parameters, we need some way of differentiating them
Is this going to be some followup work?
(premium-features/assert-has-feature feature feature-name) | ||
(handler request respond raise))) | ||
(with-meta | ||
(fn [request respond raise] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a weird thread on clojurians slack about functions not "technically" having support for metadata, and that it's "an implementation detail". I think this is fine though, I doubt they'll ever change it. thread here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhhh weird right?! Anyway, I think we don't have too many options here - operating vars in this place would weird.
Yeah, I think so. Making this perfect will take lots of time - meanwhile it's going to be useful as it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're good with follow up work, let's merge it and keep adding to it along the way: 👍
Right... I still need to understand why |
4205bb9
to
68c8017
Compare
@piranha Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone? |
Adds OpenAPI generation for
defendpoint
and an interface for it at/api/docs/
.Caveats:
GET_docs*
mentioned inapi.routes
and others I'm using for tests)required
, but... or null
- that needs to improveI'd really love to fix clj-kondo, but don't understand how. I think others are fine to fix later on when we get a bit of feedback on this.