mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 02:27:04 +00:00
python: ignore long lines for model descriptions (#16518)
Descriptions can easily exceed line-length limits because they are often extracted from doc/comments strings, which may use unexpected formatting. Python doc strings, in particular, are likely to use newlines, which mustache does not preserve, causing descriptions to be condensed to a single line.
This commit is contained in:
committed by
GitHub
parent
0192baed42
commit
b34a10aee7
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictStr
|
||||
|
||||
class ClassModel(BaseModel):
|
||||
"""
|
||||
Model for testing model with \"_class\" property
|
||||
Model for testing model with \"_class\" property # noqa: E501
|
||||
"""
|
||||
var_class: Optional[StrictStr] = Field(None, alias="_class")
|
||||
additional_properties: Dict[str, Any] = {}
|
||||
|
||||
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictStr
|
||||
|
||||
class File(BaseModel):
|
||||
"""
|
||||
Must be named `File` for test.
|
||||
Must be named `File` for test. # noqa: E501
|
||||
"""
|
||||
source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization")
|
||||
additional_properties: Dict[str, Any] = {}
|
||||
|
||||
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictStr
|
||||
|
||||
class HealthCheckResult(BaseModel):
|
||||
"""
|
||||
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. # noqa: E501
|
||||
"""
|
||||
nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage")
|
||||
additional_properties: Dict[str, Any] = {}
|
||||
|
||||
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictInt, StrictStr
|
||||
|
||||
class Model200Response(BaseModel):
|
||||
"""
|
||||
Model for testing model name starting with number
|
||||
Model for testing model name starting with number # noqa: E501
|
||||
"""
|
||||
name: Optional[StrictInt] = None
|
||||
var_class: Optional[StrictStr] = Field(None, alias="class")
|
||||
|
||||
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictInt
|
||||
|
||||
class ModelReturn(BaseModel):
|
||||
"""
|
||||
Model for testing reserved words
|
||||
Model for testing reserved words # noqa: E501
|
||||
"""
|
||||
var_return: Optional[StrictInt] = Field(None, alias="return")
|
||||
additional_properties: Dict[str, Any] = {}
|
||||
|
||||
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictInt, StrictStr
|
||||
|
||||
class Name(BaseModel):
|
||||
"""
|
||||
Model for testing model name same as property name
|
||||
Model for testing model name same as property name # noqa: E501
|
||||
"""
|
||||
name: StrictInt = Field(...)
|
||||
snake_case: Optional[StrictInt] = None
|
||||
|
||||
@@ -23,7 +23,7 @@ from pydantic import BaseModel, Field, StrictBool
|
||||
|
||||
class ObjectToTestAdditionalProperties(BaseModel):
|
||||
"""
|
||||
Minimal object
|
||||
Minimal object # noqa: E501
|
||||
"""
|
||||
var_property: Optional[StrictBool] = Field(False, alias="property", description="Property")
|
||||
additional_properties: Dict[str, Any] = {}
|
||||
|
||||
Reference in New Issue
Block a user