From 12cf076118570eebbff08c6b3090e0d4798447a1 Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Wed, 3 Apr 2024 03:17:55 -0400 Subject: no venv --- .../litestar/openapi/spec/operation.py | 105 --------------------- 1 file changed, 105 deletions(-) delete mode 100644 venv/lib/python3.11/site-packages/litestar/openapi/spec/operation.py (limited to 'venv/lib/python3.11/site-packages/litestar/openapi/spec/operation.py') diff --git a/venv/lib/python3.11/site-packages/litestar/openapi/spec/operation.py b/venv/lib/python3.11/site-packages/litestar/openapi/spec/operation.py deleted file mode 100644 index ab80181..0000000 --- a/venv/lib/python3.11/site-packages/litestar/openapi/spec/operation.py +++ /dev/null @@ -1,105 +0,0 @@ -from __future__ import annotations - -from dataclasses import dataclass -from typing import TYPE_CHECKING - -from litestar.openapi.spec.base import BaseSchemaObject - -if TYPE_CHECKING: - from litestar.openapi.spec.callback import Callback - from litestar.openapi.spec.external_documentation import ExternalDocumentation - from litestar.openapi.spec.parameter import Parameter - from litestar.openapi.spec.reference import Reference - from litestar.openapi.spec.request_body import RequestBody - from litestar.openapi.spec.responses import Responses - from litestar.openapi.spec.security_requirement import SecurityRequirement - from litestar.openapi.spec.server import Server - -__all__ = ("Operation",) - - -@dataclass -class Operation(BaseSchemaObject): - """Describes a single API operation on a path.""" - - tags: list[str] | None = None - """A list of tags for API documentation control. - - Tags can be used for logical grouping of operations by resources or any other qualifier. - """ - - summary: str | None = None - """A short summary of what the operation does.""" - - description: str | None = None - """A verbose explanation of the operation behavior. - - `CommonMark syntax `_ MAY be used for rich text representation. - """ - - external_docs: ExternalDocumentation | None = None - """Additional external documentation for this operation.""" - - operation_id: str | None = None - """Unique string used to identify the operation. - - The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools - and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow - common programming naming conventions. - """ - - parameters: list[Parameter | Reference] | None = None - """A list of parameters that are applicable for this operation. - - If a parameter is already defined at the `Path Item `_, - the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A - unique parameter is defined by a combination of a `name `_ and - `location `_. The list can use the - `Reference Object `_ to link to parameters that are defined at - the `OpenAPI Object's components/parameters `_. - """ - - request_body: RequestBody | Reference | None = None - """The request body applicable for this operation. - - The ``requestBody`` is fully supported in HTTP methods where the HTTP 1.1 specification - :rfc:`7231` has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such - as `GET `_, - `HEAD `_ and - `DELETE `_, ``requestBody`` is permitted but does not have - well-defined semantics and SHOULD be avoided if possible. - """ - - responses: Responses | None = None - """The list of possible responses as they are returned from executing this operation.""" - - callbacks: dict[str, Callback | Reference] | None = None - """A map of possible out-of band callbacks related to the parent operation. - - The key is a unique identifier for the Callback Object. Each value in the map is a - `Callback Object `_ that describes a request that may be - initiated by the API provider and the expected responses. - """ - - deprecated: bool = False - """Declares this operation to be deprecated. - - Consumers SHOULD refrain from usage of the declared operation. Default value is ``False``. - """ - - security: list[SecurityRequirement] | None = None - """A declaration of which security mechanisms can be used for this operation. - - The list of values includes alternative security requirement objects that can be used. Only one of the security - requirement objects need to be satisfied to authorize a request. To make security optional, an empty security - requirement (``{}``) can be included in the array. This definition overrides any declared top-level - `security `_. To remove a top-level security declaration, an empty - array can be used. - """ - - servers: list[Server] | None = None - """An alternative ``server`` array to service this operation. - - If an alternative ``server`` object is specified at the Path Item Object or Root level, it will be overridden by - this value. - """ -- cgit v1.2.3