| 564 | class AnotherApi extends HttpApi.make("another").add(GroupsApi) {} |
| 565 | |
| 566 | class Api extends HttpApi.make("api") |
| 567 | .addHttpApi(AnotherApi) |
| 568 | .add(UsersApi.prefix("/users")) |
| 569 | .add(TopLevelApi) |
| 570 | .addError(GlobalError, { status: 413 }) |
| 571 | .annotateContext(OpenApi.annotations({ |
| 572 | title: "API", |
| 573 | summary: "test api summary", |
| 574 | transform: (openApiSpec) => ({ |
| 575 | ...openApiSpec, |
| 576 | tags: [...openApiSpec.tags ?? [], { |
| 577 | name: "Tag from OpenApi.Transform annotation" |
| 578 | }] |
| 579 | }) |
| 580 | })) |
| 581 | .annotate( |
| 582 | HttpApi.AdditionalSchemas, |
| 583 | [ |
| 584 | Schema.Struct({ |
| 585 | contentType: Schema.String, |
| 586 | length: Schema.Int |
| 587 | }).annotations({ |
| 588 | identifier: "ComponentsSchema" |
| 589 | }) |
| 590 | ] |
| 591 | ) |
| 592 | {} |
| 593 | |
| 594 | // impl |
| 595 |
nothing calls this directly
no test coverage detected