Skip to content

Commit

Permalink
Merge pull request #67 from McSym28/schema_examples
Browse files Browse the repository at this point in the history
Add `:examples` key to OpenAPI.Spec.Schema
  • Loading branch information
aj-foster authored Sep 10, 2024
2 parents 2240abd + 790e03e commit 1a09bae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/open_api/spec/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ defmodule OpenAPI.Spec.Schema do
xml: Spec.Schema.XML.t(),
external_docs: Spec.ExternalDocumentation.t() | nil,
example: any,
examples: list() | nil,
deprecated: boolean
}

Expand Down Expand Up @@ -103,6 +104,7 @@ defmodule OpenAPI.Spec.Schema do
:xml,
:external_docs,
:example,
:examples,
:deprecated
]

Expand Down Expand Up @@ -184,6 +186,7 @@ defmodule OpenAPI.Spec.Schema do
xml: xml,
external_docs: docs,
example: Map.get(yaml, "example"),
examples: Map.get(yaml, "examples"),
deprecated: Map.get(yaml, "deprecated", false)
}

Expand Down

0 comments on commit 1a09bae

Please sign in to comment.