infra-nest-server.bootstrapaccepts a parameter of type
OpenAPIObjectwhich is used to configure the SwaggerUI. The service should set the base properties in
openApi.tsand then use NestJS OpenAPI Decorators on controllers, methods, models and DTOs.
-jsonadded. For example if the SwaggerUI is rendered on
https://innskra.island.is/api/swaggerthen the document can be downloaded from
openApi.tsexample above, we add the server property. To get the environment specific host details we use the environment variable
PUBLIC_URL. This variable needs to be set in the service infra dsl (or helm chart if it's not yet part of the monorepo infra namespaces).
esbuild.jsonfor our SwaggerUI to work in a production build.