feat(ext-openapi): a route can say it is not part of the API
Every class-based route is documented, which is what keeps a document from lying by omission. Some routes are not API at all — a health check, an internal callback, something on its way out — and @Undocumented says so, once, where the handler is. Inherited, so a base class leaves out every handler written against it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6a6431c528
commit
9090ba59f5
@@ -33,6 +33,18 @@ Every class-based route is documented, annotated or not. Read off the code:
|
||||
|
||||
Annotations add what the code cannot say: prose, extra statuses, examples. They never repeat it.
|
||||
|
||||
## Leaving a route out
|
||||
|
||||
```java
|
||||
@GET("/healthz")
|
||||
@Undocumented
|
||||
public final class Health extends RequestHandler { ... }
|
||||
```
|
||||
|
||||
Every route is documented, so a document never lies by omission. `@Undocumented` says a route is
|
||||
not part of the API — a health check, an internal callback, something on its way out. On a base
|
||||
class it leaves out every handler written against it.
|
||||
|
||||
## Request bodies
|
||||
|
||||
A handler that extends `BodyHandler` — `JsonHandler` and `XmlHandler`, and anything else that
|
||||
|
||||
Reference in New Issue
Block a user