Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Swagger2 basePath property #203

Open
olensmar opened this issue Dec 6, 2021 · 0 comments
Open

Support Swagger2 basePath property #203

olensmar opened this issue Dec 6, 2021 · 0 comments

Comments

@olensmar
Copy link
Member

olensmar commented Dec 6, 2021

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: {}
@olensmar olensmar changed the title Support Swagger 2 basePath property Support Swagger2 basePath property Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant