tektoncd/pipeline

Add support for enum in object params

Aberta

#7.568 aberto em 16 de jan. de 2024

 (0 comentário) (1 reação) (1 responsável)Go (1.943 forks)auto 404
area/apihelp wantedkind/feature

Métricas do repositório

Stars
 (9.013 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Feature request

It should be possible to use enum in parameters of type object on string fields.

Use case

An example of usage would be:

    params:
    - name: go
      description: >-
        Golang options, such as flags, …
      type: object
      properties:
        version:
          type: string
          enum: ["1.19", "1.20", "1.21", "1.22"]
        GOFLAGS: {type: string}
        GOOS: {type: string}
        GOARCH: {type: string}
        CGO_ENABLED: {type: string}
      default:
        version: "1.21"
        GOFLAGS: "-v"
        GOOS: ""
        GOARCH: ""
        CGO_ENABLED: "0"

Guia do colaborador