Skip to content

Commit b0dd28a

Browse files
committed
openapi_schema_pydantic / remove ellipsis notation
- Mypy do not well support it to declare `undefined` value
1 parent 9dc2cac commit b0dd28a

14 files changed

+16
-16
lines changed

openapi_python_client/schema/openapi_schema_pydantic/discriminator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Discriminator(BaseModel):
1414
When using the discriminator, _inline_ schemas will not be considered.
1515
"""
1616

17-
propertyName: str = ... # type: ignore [assignment]
17+
propertyName: str
1818
"""
1919
**REQUIRED**. The name of the property in the payload that will hold the discriminator value.
2020
"""

openapi_python_client/schema/openapi_schema_pydantic/external_documentation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ExternalDocumentation(BaseModel):
1212
[CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
1313
"""
1414

15-
url: AnyUrl = ... # type: ignore [assignment]
15+
url: AnyUrl
1616
"""
1717
**REQUIRED**. The URL for the target documentation.
1818
Value MUST be in the format of a URL.

openapi_python_client/schema/openapi_schema_pydantic/info.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Info(BaseModel):
1313
and MAY be presented in editing or documentation generation tools for convenience.
1414
"""
1515

16-
title: str = ... # type: ignore [assignment]
16+
title: str
1717
"""
1818
**REQUIRED**. The title of the API.
1919
"""
@@ -40,7 +40,7 @@ class Info(BaseModel):
4040
The license information for the exposed API.
4141
"""
4242

43-
version: str = ... # type: ignore [assignment]
43+
version: str
4444
"""
4545
**REQUIRED**. The version of the OpenAPI document
4646
(which is distinct from the [OpenAPI Specification version](#oasVersion) or the API implementation version).

openapi_python_client/schema/openapi_schema_pydantic/license.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class License(BaseModel):
88
License information for the exposed API.
99
"""
1010

11-
name: str = ... # type: ignore [assignment]
11+
name: str
1212
"""
1313
**REQUIRED**. The license name used for the API.
1414
"""

openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class OAuthFlow(BaseModel):
2727
The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
2828
"""
2929

30-
scopes: Dict[str, str] = ... # type: ignore [assignment]
30+
scopes: Dict[str, str]
3131
"""
3232
**REQUIRED**. The available scopes for the OAuth2 security scheme.
3333
A map between the scope name and a short description for it.

openapi_python_client/schema/openapi_schema_pydantic/open_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
class OpenAPI(BaseModel):
1515
"""This is the root document object of the OpenAPI document."""
1616

17-
info: Info = ... # type: ignore [assignment]
17+
info: Info
1818
"""
1919
**REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
2020
"""
@@ -26,7 +26,7 @@ class OpenAPI(BaseModel):
2626
the default value would be a [Server Object](#serverObject) with a [url](#serverUrl) value of `/`.
2727
"""
2828

29-
paths: Paths = ... # type: ignore [assignment]
29+
paths: Paths
3030
"""
3131
**REQUIRED**. The available paths and operations for the API.
3232
"""

openapi_python_client/schema/openapi_schema_pydantic/operation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Operation(BaseModel):
6666
In other cases where the HTTP spec is vague, `requestBody` SHALL be ignored by consumers.
6767
"""
6868

69-
responses: Responses = ... # type: ignore [assignment]
69+
responses: Responses
7070
"""
7171
**REQUIRED**. The list of possible responses as they are returned from executing this operation.
7272
"""

openapi_python_client/schema/openapi_schema_pydantic/parameter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Parameter(BaseModel):
1818

1919
"""Fixed Fields"""
2020

21-
name: str = ... # type: ignore [assignment]
21+
name: str
2222
"""
2323
**REQUIRED**. The name of the parameter.
2424
Parameter names are *case sensitive*.

openapi_python_client/schema/openapi_schema_pydantic/request_body.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class RequestBody(BaseModel):
1616
[CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
1717
"""
1818

19-
content: Dict[str, MediaType] = ... # type: ignore [assignment]
19+
content: Dict[str, MediaType]
2020
"""
2121
**REQUIRED**. The content of the request body.
2222
The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D)

openapi_python_client/schema/openapi_schema_pydantic/response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Response(BaseModel):
1414
static `links` to operations based on the response.
1515
"""
1616

17-
description: str = ... # type: ignore [assignment]
17+
description: str
1818
"""
1919
**REQUIRED**. A short description of the response.
2020
[CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.

openapi_python_client/schema/openapi_schema_pydantic/security_scheme.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SecurityScheme(BaseModel):
1515
and [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06).
1616
"""
1717

18-
type: str = ... # type: ignore [assignment]
18+
type: str
1919
"""
2020
**REQUIRED**. The type of the security scheme.
2121
Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.

openapi_python_client/schema/openapi_schema_pydantic/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class Server(BaseModel):
99
"""An object representing a Server."""
1010

11-
url: str = ... # type: ignore [assignment]
11+
url: str
1212
"""
1313
**REQUIRED**. A URL to the target host.
1414

openapi_python_client/schema/openapi_schema_pydantic/server_variable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ServerVariable(BaseModel):
1212
The array SHOULD NOT be empty.
1313
"""
1414

15-
default: str = ... # type: ignore [assignment]
15+
default: str
1616
"""
1717
**REQUIRED**. The default value to use for substitution,
1818
which SHALL be sent if an alternate value is _not_ supplied.

openapi_python_client/schema/openapi_schema_pydantic/tag.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Tag(BaseModel):
1111
It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.
1212
"""
1313

14-
name: str = ... # type: ignore [assignment]
14+
name: str
1515
"""
1616
**REQUIRED**. The name of the tag.
1717
"""

0 commit comments

Comments
 (0)