| 502 | class AnotherApi extends HttpApi.make("another").add(GroupsApi) {} |
| 503 | |
| 504 | class Api extends HttpApi.make("api") |
| 505 | .addHttpApi(AnotherApi) |
| 506 | .add(UsersApi.prefix("/users")) |
| 507 | .add(TopLevelApi) |
| 508 | .addError(GlobalError, { status: 413 }) |
| 509 | .annotateContext(OpenApi.annotations({ |
| 510 | title: "API", |
| 511 | summary: "test api summary", |
| 512 | transform: (openApiSpec) => ({ |
| 513 | ...openApiSpec, |
| 514 | tags: [...openApiSpec.tags ?? [], { |
| 515 | name: "Tag from OpenApi.Transform annotation" |
| 516 | }] |
| 517 | }) |
| 518 | })) |
| 519 | .annotate( |
| 520 | HttpApi.AdditionalSchemas, |
| 521 | [ |
| 522 | Schema.Struct({ |
| 523 | contentType: Schema.String, |
| 524 | length: Schema.Int |
| 525 | }).annotations({ |
| 526 | identifier: "ComponentsSchema" |
| 527 | }) |
| 528 | ] |
| 529 | ) |
| 530 | {} |
| 531 | |
| 532 | // impl |
| 533 |
nothing calls this directly
no test coverage detected