openapi-python-client 0.21.1__tar.gz → 0.21.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/PKG-INFO +7 -12
  2. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/README.md +5 -10
  3. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/model_property.py +2 -2
  4. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/pyproject.toml +2 -2
  5. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/.gitignore +0 -0
  6. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/LICENSE +0 -0
  7. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/__init__.py +0 -0
  8. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/__main__.py +0 -0
  9. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/cli.py +0 -0
  10. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/config.py +0 -0
  11. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/__init__.py +0 -0
  12. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/bodies.py +0 -0
  13. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/errors.py +0 -0
  14. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/openapi.py +0 -0
  15. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/__init__.py +0 -0
  16. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/any.py +0 -0
  17. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/boolean.py +0 -0
  18. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/const.py +0 -0
  19. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/date.py +0 -0
  20. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/datetime.py +0 -0
  21. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/enum_property.py +0 -0
  22. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/file.py +0 -0
  23. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/float.py +0 -0
  24. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/int.py +0 -0
  25. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/list_property.py +0 -0
  26. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/none.py +0 -0
  27. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/property.py +0 -0
  28. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/protocol.py +0 -0
  29. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/schemas.py +0 -0
  30. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/string.py +0 -0
  31. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/properties/union.py +0 -0
  32. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/parser/responses.py +0 -0
  33. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/py.typed +0 -0
  34. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/3.0.3.md +0 -0
  35. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/3.1.0.md +0 -0
  36. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/__init__.py +0 -0
  37. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/data_type.py +0 -0
  38. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/LICENSE +0 -0
  39. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/README.md +0 -0
  40. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/__init__.py +0 -0
  41. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/callback.py +0 -0
  42. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/components.py +0 -0
  43. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/contact.py +0 -0
  44. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/discriminator.py +0 -0
  45. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/encoding.py +0 -0
  46. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/example.py +0 -0
  47. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/external_documentation.py +0 -0
  48. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/header.py +0 -0
  49. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/info.py +0 -0
  50. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/license.py +0 -0
  51. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/link.py +0 -0
  52. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/media_type.py +0 -0
  53. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py +0 -0
  54. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/oauth_flows.py +0 -0
  55. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/open_api.py +0 -0
  56. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/operation.py +0 -0
  57. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/parameter.py +0 -0
  58. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/path_item.py +0 -0
  59. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/paths.py +0 -0
  60. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/reference.py +0 -0
  61. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/request_body.py +0 -0
  62. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/response.py +0 -0
  63. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/responses.py +0 -0
  64. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/schema.py +0 -0
  65. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/security_requirement.py +0 -0
  66. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/security_scheme.py +0 -0
  67. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/server.py +0 -0
  68. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/server_variable.py +0 -0
  69. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/tag.py +0 -0
  70. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/openapi_schema_pydantic/xml.py +0 -0
  71. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/schema/parameter_location.py +0 -0
  72. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/.gitignore.jinja +0 -0
  73. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/README.md.jinja +0 -0
  74. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/api_init.py.jinja +0 -0
  75. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/client.py.jinja +0 -0
  76. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/endpoint_init.py.jinja +0 -0
  77. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/endpoint_macros.py.jinja +0 -0
  78. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/endpoint_module.py.jinja +0 -0
  79. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/errors.py.jinja +0 -0
  80. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/helpers.jinja +0 -0
  81. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/int_enum.py.jinja +0 -0
  82. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/model.py.jinja +0 -0
  83. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/models_init.py.jinja +0 -0
  84. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/package_init.py.jinja +0 -0
  85. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/any_property.py.jinja +0 -0
  86. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/boolean_property.py.jinja +0 -0
  87. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/const_property.py.jinja +0 -0
  88. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/date_property.py.jinja +0 -0
  89. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/datetime_property.py.jinja +0 -0
  90. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/enum_property.py.jinja +0 -0
  91. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/file_property.py.jinja +0 -0
  92. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/float_property.py.jinja +0 -0
  93. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/helpers.jinja +0 -0
  94. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/int_property.py.jinja +0 -0
  95. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/list_property.py.jinja +0 -0
  96. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/model_property.py.jinja +0 -0
  97. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/property_macros.py.jinja +0 -0
  98. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/property_templates/union_property.py.jinja +0 -0
  99. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/pyproject.toml.jinja +0 -0
  100. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/pyproject_ruff.toml.jinja +0 -0
  101. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/setup.py.jinja +0 -0
  102. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/str_enum.py.jinja +0 -0
  103. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/templates/types.py.jinja +0 -0
  104. {openapi_python_client-0.21.1 → openapi_python_client-0.21.3}/openapi_python_client/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openapi-python-client
3
- Version: 0.21.1
3
+ Version: 0.21.3
4
4
  Summary: Generate modern Python clients from OpenAPI
5
5
  Project-URL: repository, https://github.com/openapi-generators/openapi-python-client
6
6
  Author-email: Dylan Anthony <contact@dylananthony.com>
@@ -26,7 +26,7 @@ Requires-Dist: jinja2<4.0.0,>=3.0.0
26
26
  Requires-Dist: pydantic<3.0.0,>=2.1.1
27
27
  Requires-Dist: python-dateutil<3.0.0,>=2.8.1
28
28
  Requires-Dist: ruamel-yaml<0.19.0,>=0.18.6
29
- Requires-Dist: ruff<0.5,>=0.2
29
+ Requires-Dist: ruff<0.7,>=0.2
30
30
  Requires-Dist: shellingham<2.0.0,>=1.3.2
31
31
  Requires-Dist: typer<0.13,>0.6
32
32
  Requires-Dist: typing-extensions<5.0.0,>=4.8.0
@@ -75,23 +75,18 @@ Then, if you want tab completion: `openapi-python-client --install-completion`
75
75
  `openapi-python-client generate --url https://my.api.com/openapi.json`
76
76
 
77
77
  This will generate a new client library named based on the title in your OpenAPI spec. For example, if the title
78
- of your API is "My API", the expected output will be "my-api-client". If a folder already exists by that name, you'll
79
- get an error.
78
+ of your API is "My API", the expected output will be "my-api-client". You can change that directory name with the config file (documented below) or with `--output-path`.
80
79
 
81
- If you have an `openapi.json` file available on disk, in any CLI invocation you can build off that instead by replacing `--url` with a `--path`:
80
+ If the directory to generate already exists, you'll get an error unless you use `--overwrite`.
82
81
 
83
- `openapi-python-client generate --path location/on/disk/openapi.json`
84
-
85
- ### Update an existing client
86
-
87
- `openapi-python-client update --url https://my.api.com/openapi.json`
82
+ You can use an OpenAPI file instead of a URL like `openapi-python-client generate --path location/on/disk/openapi.json`.
88
83
 
89
84
  ### Using custom templates
90
85
 
91
- This feature leverages Jinja2's [ChoiceLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.ChoiceLoader) and [FileSystemLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.FileSystemLoader). This means you do _not_ need to customize every template. Simply copy the template(s) you want to customize from [the default template directory](openapi_python_client/templates) to your own custom template directory (file names _must_ match exactly) and pass the template directory through the `custom-template-path` flag to the `generate` and `update` commands. For instance,
86
+ This feature leverages Jinja2's [ChoiceLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.ChoiceLoader) and [FileSystemLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.FileSystemLoader). This means you do _not_ need to customize every template. Simply copy the template(s) you want to customize from [the default template directory](openapi_python_client/templates) to your own custom template directory (file names _must_ match exactly) and pass the template directory through the `custom-template-path` flag to the `generate` command:
92
87
 
93
88
  ```
94
- openapi-python-client update \
89
+ openapi-python-client generate \
95
90
  --url https://my.api.com/openapi.json \
96
91
  --custom-template-path=relative/path/to/mytemplates
97
92
  ```
@@ -41,23 +41,18 @@ Then, if you want tab completion: `openapi-python-client --install-completion`
41
41
  `openapi-python-client generate --url https://my.api.com/openapi.json`
42
42
 
43
43
  This will generate a new client library named based on the title in your OpenAPI spec. For example, if the title
44
- of your API is "My API", the expected output will be "my-api-client". If a folder already exists by that name, you'll
45
- get an error.
44
+ of your API is "My API", the expected output will be "my-api-client". You can change that directory name with the config file (documented below) or with `--output-path`.
46
45
 
47
- If you have an `openapi.json` file available on disk, in any CLI invocation you can build off that instead by replacing `--url` with a `--path`:
46
+ If the directory to generate already exists, you'll get an error unless you use `--overwrite`.
48
47
 
49
- `openapi-python-client generate --path location/on/disk/openapi.json`
50
-
51
- ### Update an existing client
52
-
53
- `openapi-python-client update --url https://my.api.com/openapi.json`
48
+ You can use an OpenAPI file instead of a URL like `openapi-python-client generate --path location/on/disk/openapi.json`.
54
49
 
55
50
  ### Using custom templates
56
51
 
57
- This feature leverages Jinja2's [ChoiceLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.ChoiceLoader) and [FileSystemLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.FileSystemLoader). This means you do _not_ need to customize every template. Simply copy the template(s) you want to customize from [the default template directory](openapi_python_client/templates) to your own custom template directory (file names _must_ match exactly) and pass the template directory through the `custom-template-path` flag to the `generate` and `update` commands. For instance,
52
+ This feature leverages Jinja2's [ChoiceLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.ChoiceLoader) and [FileSystemLoader](https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.FileSystemLoader). This means you do _not_ need to customize every template. Simply copy the template(s) you want to customize from [the default template directory](openapi_python_client/templates) to your own custom template directory (file names _must_ match exactly) and pass the template directory through the `custom-template-path` flag to the `generate` command:
58
53
 
59
54
  ```
60
- openapi-python-client update \
55
+ openapi-python-client generate \
61
56
  --url https://my.api.com/openapi.json \
62
57
  --custom-template-path=relative/path/to/mytemplates
63
58
  ```
@@ -223,9 +223,9 @@ def _values_are_subset(first: EnumProperty, second: EnumProperty) -> bool:
223
223
  def _types_are_subset(first: EnumProperty, second: Property) -> bool:
224
224
  from . import IntProperty, StringProperty
225
225
 
226
- if first.value_type == int and isinstance(second, IntProperty):
226
+ if first.value_type is int and isinstance(second, IntProperty):
227
227
  return True
228
- if first.value_type == str and isinstance(second, StringProperty):
228
+ if first.value_type is str and isinstance(second, StringProperty):
229
229
  return True
230
230
  return False
231
231
 
@@ -14,11 +14,11 @@ dependencies = [
14
14
  "python-dateutil>=2.8.1,<3.0.0",
15
15
  "httpx>=0.20.0,<0.28.0",
16
16
  "ruamel.yaml>=0.18.6,<0.19.0",
17
- "ruff>=0.2,<0.5",
17
+ "ruff>=0.2,<0.7",
18
18
  "typing-extensions>=4.8.0,<5.0.0",
19
19
  ]
20
20
  name = "openapi-python-client"
21
- version = "0.21.1"
21
+ version = "0.21.3"
22
22
  description = "Generate modern Python clients from OpenAPI"
23
23
  keywords = [
24
24
  "OpenAPI",