kusk-gen
kusk-gen copied to clipboard
Support Swagger2 basePath property
When kusk generates operation-specific ingresses from a swagger2 specification, the (optional) basePath in that definition gets lost. For example if my Swagger2 definition contains
basePath: "/api"
and an operation-level override for some operation:
x-kusk:
disabled: true
the generated ingresses are missing the leading "/api" path segment - which I have to add manually;
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /pet
creationTimestamp: null
name: petstore-pet
namespace: default
spec:
ingressClassName: nginx
rules:
- http:
paths:
- backend:
service:
name: petstore
port:
number: 8001
path: /pet
pathType: Exact
status:
loadBalancer: {}