diff options
author | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
commit | 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 (patch) | |
tree | b1c931051ffcebd2bd9d61d98d6233ffa289bbce /venv/lib/python3.11/site-packages/litestar/openapi/spec/example.py | |
parent | 4f884c9abc32990b4061a1bb6997b4b37e58ea0b (diff) |
venv
Diffstat (limited to 'venv/lib/python3.11/site-packages/litestar/openapi/spec/example.py')
-rw-r--r-- | venv/lib/python3.11/site-packages/litestar/openapi/spec/example.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/litestar/openapi/spec/example.py b/venv/lib/python3.11/site-packages/litestar/openapi/spec/example.py new file mode 100644 index 0000000..414452e --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/openapi/spec/example.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any + +from litestar.openapi.spec.base import BaseSchemaObject + + +@dataclass +class Example(BaseSchemaObject): + summary: str | None = None + """Short description for the example.""" + + description: str | None = None + """Long description for the example. + + `CommonMark syntax <https://spec.commonmark.org/>`_ MAY be used for rich text representation. + """ + + value: Any | None = None + """Embedded literal example. + + The ``value`` field and ``externalValue`` field are mutually exclusive. To represent examples of media types that + cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. + """ + + external_value: str | None = None + """A URL that points to the literal example. This provides the capability to reference examples that cannot easily + be included in JSON or YAML documents. + + The ``value`` field and ``externalValue`` field are mutually exclusive. See the rules for resolving + `Relative References <https://spec.openapis.org/oas/v3.1.0#relativeReferencesURI>`_. + """ |