|
55 | 55 | * the mirror; it is not built here because Prime Directive #2 keeps logic out |
56 | 56 | * of `packages/spec` and the frozen vocabulary is not this unit's to widen. |
57 | 57 | * |
58 | | - * ## Today it emits nothing |
| 58 | + * ## What it emits today |
59 | 59 | * |
60 | | - * Publish/validate still rejects a non-empty `apis:` until the E7 flip, so the |
61 | | - * enumeration yields an empty set and {@link enrichOpenApiWithEndpoints} |
62 | | - * returns its input document BY REFERENCE — the served bytes are identical to |
63 | | - * before this change. That invariant is pinned by a test rather than argued. |
| 60 | + * Real documents. The #5040 E7 publish flip |
| 61 | + * (`packages/spec/src/api/endpoint-publish-gate.ts`) ended the wholesale |
| 62 | + * refusal of a non-empty `apis:`, so the enumeration is no longer empty on a |
| 63 | + * deployment that declares endpoints: a real showcase boot serves an |
| 64 | + * `/openapi.json` describing its two declared endpoints |
| 65 | + * (`packages/qa/dogfood/test/showcase-declarative-endpoints.dogfood.test.ts`). |
| 66 | + * |
| 67 | + * The empty-set case is still exact rather than approximate — with nothing to |
| 68 | + * add, {@link enrichOpenApiWithEndpoints} returns its input document BY |
| 69 | + * REFERENCE — which is what keeps a deployment that declares no endpoint |
| 70 | + * byte-identical to one built before this module existed. That invariant is |
| 71 | + * pinned by a test rather than argued. |
64 | 72 | */ |
65 | 73 |
|
66 | 74 | import { ApiEndpointSchema, type ApiEndpoint } from '@objectstack/spec/api'; |
@@ -328,8 +336,10 @@ export function selectDocumentableEndpoints( |
328 | 336 | * Fold declared endpoints into an OpenAPI document's `paths`. |
329 | 337 | * |
330 | 338 | * Returns `doc` ITSELF when there is nothing to add — that is what makes the |
331 | | - * empty-set case byte-identical rather than merely equivalent, and it is the |
332 | | - * state of the world until the E7 flip lets a non-empty `apis:` publish. |
| 339 | + * empty-set case byte-identical rather than merely equivalent, which is the |
| 340 | + * state a deployment declaring no endpoint stays in. Since the E7 flip let a |
| 341 | + * non-empty `apis:` publish, the other branch is the live one wherever |
| 342 | + * endpoints are declared. |
333 | 343 | * |
334 | 344 | * A declaration never displaces a built-in: if the document already describes |
335 | 345 | * the same path+method, the built-in keeps it and the declaration is reported. |
|
0 commit comments