Skip to content

Generated HTTPRoute contains null fields #91

@pehala

Description

@pehala

When generating HTTPRoute, it contains null fields. This can cause validation errors (incorrect status in this case) when supplying output directly to kubectl apply (Can be fixed by using --validate=false)
Version: 0.2.3

Generated HTTPRoute:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  creationTimestamp: null
  name: route-phala--a3ji
spec:
  hostnames:
  - test.com
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: gw-phala--cynv
    namespace: kuadrant
  rules:
  - matches:
    - method: GET
      path:
        type: Exact
        value: /get
  - matches:
    - method: PUT
      path:
        type: Exact
        value: /anything
  - matches:
    - method: GET
      path:
        type: Exact
        value: /anything
status:
  parents: null

Source OAS:

info:
  title: Httpbin
  version: 0.0.51
  x-kuadrant:
    route:
      hostnames:
      - test.com
      name: route-phala--a3ji
      parentRefs:
      - group: gateway.networking.k8s.io
        kind: Gateway
        name: gw-phala--cynv
        namespace: kuadrant
openapi: 3.1.0
paths:
  /anything:
    get:
      operationId: get_anything
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Successful Response
    put:
      operationId: put_anything
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Successful Response
  /get:
    get:
      operationId: get_get
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Successful Response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions