Skip to content

Commit

Permalink
chore: clean up openapi generator
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Apr 2, 2022
1 parent 14afb27 commit 572e449
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion xpresso/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def get_openapi(
visitor=visit_routes(
app_type=App, router=self.router, nodes=[self, self.router], path=""
),
container=self.container,
version=self._openapi_version,
info=self._openapi_info,
servers=servers,
Expand Down
5 changes: 2 additions & 3 deletions xpresso/openapi/_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from http import HTTPStatus
from typing import Any, Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union

from di.container import Container
from pydantic import BaseConfig
from pydantic.fields import ModelField
from pydantic.schema import field_schema, get_flat_models_from_fields
Expand Down Expand Up @@ -194,7 +193,8 @@ def get_operation(
"description": route.description,
"deprecated": route.deprecated,
"servers": route.servers or None,
"external_docs": route.external_docs,
"externalDocs": route.external_docs,
"operationId": route.operation_id,
}
docstring = getattr(route.endpoint, "__doc__", None)
if docstring and not data["description"]:
Expand Down Expand Up @@ -407,7 +407,6 @@ def get_flat_models(routes: Routes) -> Set[type]:

def generate_openapi(
visitor: Iterable[VisitedRoute[Any]],
container: Container,
version: str,
info: models.Info,
servers: Optional[Iterable[models.Server]],
Expand Down

0 comments on commit 572e449

Please sign in to comment.