Kubernetes manifests to host a lightweight Swagger UI that serves a fetched OpenAPI document and injects an Authorization header for interactive requests.
swagger-flexo-ui-yaml/swagger-ui.yaml: Deployment + Service (namespaceswaggerby default), init-container fetches and patches the OpenAPI doc.swagger-flexo-ui-yaml/swagger-configmap.yaml: Swagger initializer that sets theAuthorizationheader.swagger-flexo-ui-yaml/swagger-mapping.yaml: Ambassador/Emissary mappings for/doc/and/spec/.
Replace these values before applying the manifests:
OPENAPI_URL(inswagger-ui.yaml): HTTPS URL to the OpenAPI JSON you want to serve.BEARER_TOKEN(inswagger-configmap.yaml): Bearer token to prefill for Swagger requests, or remove the interceptor if you do not want a default token.SWAGGER_HOST(inswagger-mapping.yaml): External host Ambassador should match for/doc/and/spec/.
Optionally adjust:
- Namespace (
swagger) in all three YAMLs if you want a different namespace. - Image tags or resource limits as needed.
- Update the placeholders above.
- Apply the manifests (order not critical):
kubectl apply -f swagger-flexo-ui-yaml/ - Access Swagger UI at
https://<CHANGE_ME_SWAGGER_HOST>/doc/once the deployment is ready.