Skip to content

The boolean "TrueField" introduced for CORS can cause generator issues #3841

@shaneutt

Description

@shaneutt

When updating gateway-api-rs to Gateway API v1.3.0, the generators failed for the experimental version of HTTPRoute due to a boolean enum in the spec that was introduced for CORS.

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

More details are available in kube-rs/gateway-api-rs#144.

I suggest we change the type away from boolean as part of #3756.

cc @lianglli @EyalPazz @robscott @youngnick @mlavacca

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions