Skip to content

Instantly share code, notes, and snippets.

View SidneyAllen's full-sized avatar

Sidney Maestre SidneyAllen

View GitHub Profile
@SidneyAllen
SidneyAllen / codegen-enum.yaml
Created February 17, 2024 01:27
openapi-string-29-codegen-enum
type: string
enum:
- Red
- Orange
- Yellow
- Green
@SidneyAllen
SidneyAllen / codegen-pattern.yaml
Created February 17, 2024 01:26
openapi-string-28-codegen-pattern
type: string
minLength: 1
maxLength: 100
pattern: "^[A-Za-z0-9]+$"
@SidneyAllen
SidneyAllen / codegen-format.yaml
Created February 17, 2024 01:24
openapi-string-27-codegen-format
type: string
format: email
@SidneyAllen
SidneyAllen / codegen-description.yaml
Created February 17, 2024 01:23
openapi-string-26-codegen-description
type: string
description: "This field stores the user’s full name."
@SidneyAllen
SidneyAllen / codegen-example.yaml
Created February 16, 2024 20:14
openapi-string-25-codegen-example
type: string
example: "John Doe"
@SidneyAllen
SidneyAllen / nullable-valid.json
Created February 16, 2024 20:08
openapi-string-24-nullable-valid
"abcd"
null
@SidneyAllen
SidneyAllen / nullable-example-3-1.yaml
Created February 16, 2024 20:06
openapi-string-23-nullable-example-3-1
type: ["string", "null"]
@SidneyAllen
SidneyAllen / nullable-example-3-0.yaml
Created February 16, 2024 20:05
openapi-string-22-nullable-example-3-0
type: string
nullable: true
@SidneyAllen
SidneyAllen / const-example.yaml
Created February 16, 2024 20:03
openapi-string-21-const-example
type: string
const: Red
@SidneyAllen
SidneyAllen / enum-invalid.json
Created February 16, 2024 20:02
openapi-string-20-enum-invalid
"" //empty string not allowed
"Blue" //not defined in enum list
"red" //Value doesn’t match with Red