Skip to content

Can't generate experimental HTTPRoute with Gateway API v1.3.0 #144

Open
@shaneutt

Description

@shaneutt

While updating gateway-api-rs for Gateway API v1.3.0, I found that the experimental version of HTTPRoute can not be generated:

Error: not handling non-string/int enum outside oneOf block

With CORS support in Gateway API, a new field called TrueField was added:

// TrueField is a boolean value that can only be set to true
//
// +kubebuilder:validation:Enum=true
type TrueField bool

This is used here:

	// AllowCredentials indicates whether the actual cross-origin request allows
	// to include credentials.
	//
	// The only valid value for the `Access-Control-Allow-Credentials` response
	// header is true (case-sensitive).
	//
	// If the credentials are not allowed in cross-origin requests, the gateway
	// will omit the header `Access-Control-Allow-Credentials` entirely rather
	// than setting its value to false.
	//
	// Support: Extended
	//
	// +optional
	AllowCredentials TrueField `json:"allowCredentials,omitempty"`

This TrueField results in an enum which ultimately kopium doesn't currently handle:

properties:
  cors:
    description: |-
      CORS defines a schema for a filter that responds to the
      cross-origin request based on HTTP response header.

      Support: Extended
    properties:
      allowCredentials:
        description: |-
          AllowCredentials indicates whether the actual cross-origin request allows
          to include credentials.
          The only valid value for the `Access-Control-Allow-Credentials` response
          header is true (case-sensitive).
          If the credentials are not allowed in cross-origin requests, the gateway
          will omit the header `Access-Control-Allow-Credentials` entirely rather
          than setting its value to false.

          Support: Extended
        enum:
        - true
        type: boolean

Metadata

Metadata

Assignees

Type

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions