Skip to content

fix: handle " in string enum values#107

Merged
mnahkies merged 1 commit into
mainfrom
mn/fix/escape-quotes
Nov 12, 2023
Merged

fix: handle " in string enum values#107
mnahkies merged 1 commit into
mainfrom
mn/fix/escape-quotes

Conversation

@mnahkies
Copy link
Copy Markdown
Owner

should probably expand this to handle other things like \n but I've not seen newlines appear in string enum values very often...

allows supporting stuff like this https://github.com/APIs-guru/openapi-directory/blob/dec74da7a6785d5d5b83bc6a4cebc07336d67ec9/APIs/vercel.com/0.0.1/openapi.yaml#L4810

though I'd bet money that this is a mistake, and was supposed to be import(..) and resolve to more sensible values like production / preview / development in the yaml

target:
  description: The target environment of the environment variable
  examples:
    - - production
      - preview
  items:
    enum:
      - mport("/vercel/path0/utils/env-variable-util/types").EnvTarget.Productio
      - mport("/vercel/path0/utils/env-variable-util/types").EnvTarget.Previe
      - mport("/vercel/path0/utils/env-variable-util/types").EnvTarget.Developmen
  type: array

should probably expand this to handle other things like `\n` but I've
not seen newlines appear in string enum values very often...
@mnahkies mnahkies enabled auto-merge (squash) November 12, 2023 12:03
@mnahkies mnahkies merged commit 5b2c341 into main Nov 12, 2023
@mnahkies mnahkies deleted the mn/fix/escape-quotes branch November 12, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant