Skip to content

Conversation

@tjb346
Copy link
Owner

@tjb346 tjb346 commented Mar 3, 2025

Even with use_path_prefixes_for_title_model_names set to true, duplicate model class names can occur. By default, when duplicates are encountered they will be skipped.

Setting enumerate_duplicate_model_names to true in your config file will result in a number being added to duplicate names starting with 2. For instance, if MyModelName already exists, then the next time a model with that name is encountered, it will be named MyModelName2, then MyModelName3 and so on.


If this option results in conflicts, you will need to manually override class names instead via the `class_overrides` option.

### enumerate_duplicate_model_names

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like seeing this behavior configurable.

class_string = title
class_info = Class.from_string(string=class_string, config=config)
if config.enumerate_duplicate_model_names:
suffix = 2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does suffixing start at 2?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's the 2nd occurrence. Does 1 make more sense to you?

Copy link

@davidandrewrice davidandrewrice Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's where my mind meant! I immediately thought it was the "third" - maybe others wouldn't assume zero based indexing? I feel like I've seen it in use elsewhere in openapi-python-client.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to start at 1.

tjb346 and others added 25 commits March 4, 2025 09:11
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The usage of the `ruamel-yaml-string` package is isolated to one test
only. The same functionality is easily be provided with a simple class
method.
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff)
([source](https://redirect.github.com/astral-sh/ruff),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md))
| `>=0.2,<0.10` -> `>=0.2,<0.11` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.9.10/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.9.10/0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.10.0`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0100)

[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.10...0.10.0)

Check out the [blog post](https://astral.sh/blog/ruff-v0.10.0) for a
migration guide and overview of the changes!

##### Breaking changes

See also, the "Remapped rules" section which may result in disabled
rules.

- **Changes to how the Python version is inferred when a
`target-version` is not specified**
([#&#8203;16319](https://redirect.github.com/astral-sh/ruff/pull/16319))

In previous versions of Ruff, you could specify your Python version
with:

- The `target-version` option in a `ruff.toml` file or the `[tool.ruff]`
section of a pyproject.toml file.
- The `project.requires-python` field in a `pyproject.toml` file with a
`[tool.ruff]` section.

These options worked well in most cases, and are still recommended for
fine control of the Python version. However, because of the way Ruff
discovers config files, `pyproject.toml` files without a `[tool.ruff]`
section would be ignored, including the `requires-python` setting. Ruff
would then use the default Python version (3.9 as of this writing)
instead, which is surprising when you've attempted to request another
version.

    In v0.10, config discovery has been updated to address this issue:

- If Ruff finds a `ruff.toml` file without a `target-version`, it will
check
for a `pyproject.toml` file in the same directory and respect its
`requires-python` version, even if it does not contain a `[tool.ruff]`
        section.
- If Ruff finds a user-level configuration, the `requires-python` field
of the closest `pyproject.toml` in a parent directory will take
precedence.
- If there is no config file (`ruff.toml`or `pyproject.toml` with a
`[tool.ruff]` section) in the directory of the file being checked, Ruff
will
search for the closest `pyproject.toml` in the parent directories and
use its
        `requires-python` setting.

- **Updated `TYPE_CHECKING` behavior**
([#&#8203;16669](https://redirect.github.com/astral-sh/ruff/pull/16669))

Previously, Ruff only recognized typechecking blocks that tested the
`typing.TYPE_CHECKING` symbol. Now, Ruff recognizes any local variable
named `TYPE_CHECKING`. This release also removes support for the legacy
`if 0:` and `if False:` typechecking checks. Use a local `TYPE_CHECKING`
variable instead.

- **More robust noqa parsing**
([#&#8203;16483](https://redirect.github.com/astral-sh/ruff/pull/16483))

The syntax for both file-level and in-line suppression comments has been
unified and made more robust to certain errors. In most cases, this will
result in more suppression comments being read by Ruff, but there are a
few instances where previously read comments will now log an error to
the user instead. Please refer to the documentation on [*Error
suppression*](https://docs.astral.sh/ruff/linter/#error-suppression) for
the full specification.

- **Avoid unnecessary parentheses around with statements with a single
context manager and a trailing comment**
([#&#8203;14005](https://redirect.github.com/astral-sh/ruff/pull/14005))

This change fixes a bug in the formatter where it introduced unnecessary
parentheses around with statements with a single context manager and a
trailing comment. This change may result in a change in formatting for
some users.

- **Bump alpine default tag to 3.21 for derived Docker images**
([#&#8203;16456](https://redirect.github.com/astral-sh/ruff/pull/16456))

Alpine 3.21 was released in Dec 2024 and is used in the official
Alpine-based Python images. Now the ruff:alpine image will use 3.21
instead of 3.20 and ruff:alpine3.20 will no longer be updated.

##### Deprecated Rules

The following rules have been deprecated:

-
[`non-pep604-isinstance`](https://docs.astral.sh/ruff/rules/non-pep604-isinstance/)
(`UP038`)
-
[`suspicious-xmle-tree-usage`](https://docs.astral.sh/ruff/rules/suspicious-xmle-tree-usage/)
(`S320`)

##### Remapped rules

The following rules have been remapped to new rule codes:

-   \[`unsafe-markup-use`]: `RUF035` to `S704`

##### Stabilization

The following rules have been stabilized and are no longer in preview:

-
[`batched-without-explicit-strict`](https://docs.astral.sh/ruff/rules/batched-without-explicit-strict)
(`B911`)
-
[`unnecessary-dict-comprehension-for-iterable`](https://docs.astral.sh/ruff/rules/unnecessary-dict-comprehension-for-iterable)
(`C420`)
-
[`datetime-min-max`](https://docs.astral.sh/ruff/rules/datetime-min-max)
(`DTZ901`)
-
[`fast-api-unused-path-parameter`](https://docs.astral.sh/ruff/rules/fast-api-unused-path-parameter)
(`FAST003`)
-
[`root-logger-call`](https://docs.astral.sh/ruff/rules/root-logger-call)
(`LOG015`)
-   [`len-test`](https://docs.astral.sh/ruff/rules/len-test) (`PLC1802`)
-
[`shallow-copy-environ`](https://docs.astral.sh/ruff/rules/shallow-copy-environ)
(`PLW1507`)
- [`os-listdir`](https://docs.astral.sh/ruff/rules/os-listdir)
(`PTH208`)
-
[`invalid-pathlib-with-suffix`](https://docs.astral.sh/ruff/rules/invalid-pathlib-with-suffix)
(`PTH210`)
-
[`invalid-assert-message-literal-argument`](https://docs.astral.sh/ruff/rules/invalid-assert-message-literal-argument)
(`RUF040`)
-
[`unnecessary-nested-literal`](https://docs.astral.sh/ruff/rules/unnecessary-nested-literal)
(`RUF041`)
-
[`unnecessary-cast-to-int`](https://docs.astral.sh/ruff/rules/unnecessary-cast-to-int)
(`RUF046`)
-
[`map-int-version-parsing`](https://docs.astral.sh/ruff/rules/map-int-version-parsing)
(`RUF048`)
-
[`if-key-in-dict-del`](https://docs.astral.sh/ruff/rules/if-key-in-dict-del)
(`RUF051`)
-
[`unsafe-markup-use`](https://docs.astral.sh/ruff/rules/unsafe-markup-use)
(`S704`). This rule has also been renamed from `RUF035`.
-
[`split-static-string`](https://docs.astral.sh/ruff/rules/split-static-string)
(`SIM905`)
-
[`runtime-cast-value`](https://docs.astral.sh/ruff/rules/runtime-cast-value)
(`TC006`)
-
[`unquoted-type-alias`](https://docs.astral.sh/ruff/rules/unquoted-type-alias)
(`TC007`)
-
[`non-pep646-unpack`](https://docs.astral.sh/ruff/rules/non-pep646-unpack)
(`UP044`)

The following behaviors have been stabilized:

-
[`bad-staticmethod-argument`](https://docs.astral.sh/ruff/rules/bad-staticmethod-argument/)
(`PLW0211`)
[`invalid-first-argument-name-for-class-method`](https://docs.astral.sh/ruff/rules/invalid-first-argument-name-for-class-method/)
(`N804`): `__new__` methods are now no longer flagged by
`invalid-first-argument-name-for-class-method` (`N804`) but instead by
`bad-staticmethod-argument` (`PLW0211`)
-
[`bad-str-strip-call`](https://docs.astral.sh/ruff/rules/bad-str-strip-call/)
(`PLE1310`): The rule now applies to objects which are known to have
type `str` or `bytes`.
- [`blanket-noqa`](https://docs.astral.sh/ruff/rules/blanket-noqa/)
(`PGH004`): Also detect blanked file-level noqa comments (and not just
line level comments).
-
[`custom-type-var-for-self`](https://docs.astral.sh/ruff/rules/custom-type-var-for-self/)
(`PYI019`): More accurate detection of custom `TypeVars` replaceable by
`Self`. The range of the diagnostic is now the full function header
rather than just the return annotation.
-
[`invalid-argument-name`](https://docs.astral.sh/ruff/rules/invalid-argument-name/)
(`N803`): Ignore argument names of functions decorated with
`typing.override`
-
[`invalid-envvar-default`](https://docs.astral.sh/ruff/rules/invalid-envvar-default/)
(`PLW1508`): Detect default value arguments to `os.environ.get` with
invalid type.
-
[`pytest-raises-with-multiple-statements`](https://docs.astral.sh/ruff/rules/pytest-raises-with-multiple-statements/)
(`PT012`)
[`pytest-warns-with-multiple-statements`](https://docs.astral.sh/ruff/rules/pytest-warns-with-multiple-statements/)
(`PT031`): Allow `for` statements with an empty body in `pytest.raises`
and `pytest.warns` `with` statements.
-
[`redundant-open-modes`](https://docs.astral.sh/ruff/rules/redundant-open-modes/)
(`UP015`): The diagnostic range is now the range of the redundant mode
argument where it previously was the range of the entire open call. You
may have to replace your `noqa` comments when suppressing `UP015`.
-
[`stdlib-module-shadowing`](https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/)
(`A005`): Changes the default value of
`lint.flake8-builtins.strict-checking` from `true` to `false`.
-
[`type-none-comparison`](https://docs.astral.sh/ruff/rules/type-none-comparison/)
(`FURB169`): Now also recognizes `type(expr) is type(None)` comparisons
where `expr` isn't a name expression.

The following fixes or improvements to fixes have been stabilized:

-
[`repeated-equality-comparison`](https://docs.astral.sh/ruff/rules/repeated-equality-comparison/)
(`PLR1714`)
([#&#8203;16685](https://redirect.github.com/astral-sh/ruff/pull/16685))
- [`needless-bool`](https://docs.astral.sh/ruff/rules/needless-bool/)
(`SIM103`)
([#&#8203;16684](https://redirect.github.com/astral-sh/ruff/pull/16684))
-
[`unused-private-type-var`](https://docs.astral.sh/ruff/rules/unused-private-type-var/)
(`PYI018`)
([#&#8203;16682](https://redirect.github.com/astral-sh/ruff/pull/16682))

##### Server

- Remove logging output for `ruff.printDebugInformation`
([#&#8203;16617](https://redirect.github.com/astral-sh/ruff/pull/16617))

##### Configuration

- \[`flake8-builtins`] Deprecate the `builtins-` prefixed options in
favor of the unprefixed options (e.g. `builtins-allowed-modules` is now
deprecated in favor of `allowed-modules`)
([#&#8203;16092](https://redirect.github.com/astral-sh/ruff/pull/16092))

##### Bug fixes

- \[flake8-bandit] Fix mixed-case hash algorithm names (S324)
([#&#8203;16552](https://redirect.github.com/astral-sh/ruff/pull/16552))

##### CLI

- \[ruff] Fix `last_tag`/`commits_since_last_tag` for `version` command
([#&#8203;16686](https://redirect.github.com/astral-sh/ruff/pull/16686))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff)
([source](https://redirect.github.com/astral-sh/ruff),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md))
| `>=0.2,<0.11` -> `>=0.2,<0.12` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.10.0/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.10.0/0.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.11.0`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0110)

[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.10.0...0.11.0)

This is a follow-up to release 0.10.0. Because of a mistake in the
release process, the `requires-python` inference changes were not
included in that release. Ruff 0.11.0 now includes this change as well
as the stabilization of the preview behavior for `PGH004`.

##### Breaking changes

- **Changes to how the Python version is inferred when a
`target-version` is not specified**
([#&#8203;16319](https://redirect.github.com/astral-sh/ruff/pull/16319))

In previous versions of Ruff, you could specify your Python version
with:

- The `target-version` option in a `ruff.toml` file or the `[tool.ruff]`
section of a pyproject.toml file.
- The `project.requires-python` field in a `pyproject.toml` file with a
`[tool.ruff]` section.

These options worked well in most cases, and are still recommended for
fine control of the Python version. However, because of the way Ruff
discovers config files, `pyproject.toml` files without a `[tool.ruff]`
section would be ignored, including the `requires-python` setting. Ruff
would then use the default Python version (3.9 as of this writing)
instead, which is surprising when you've attempted to request another
version.

    In v0.10, config discovery has been updated to address this issue:

- If Ruff finds a `ruff.toml` file without a `target-version`, it will
check
for a `pyproject.toml` file in the same directory and respect its
`requires-python` version, even if it does not contain a `[tool.ruff]`
        section.
- If Ruff finds a user-level configuration, the `requires-python` field
of the closest `pyproject.toml` in a parent directory will take
precedence.
- If there is no config file (`ruff.toml`or `pyproject.toml` with a
`[tool.ruff]` section) in the directory of the file being checked, Ruff
will
search for the closest `pyproject.toml` in the parent directories and
use its
        `requires-python` setting.

##### Stabilization

The following behaviors have been stabilized:

- [`blanket-noqa`](https://docs.astral.sh/ruff/rules/blanket-noqa/)
(`PGH004`): Also detect blanked file-level noqa comments (and not just
line level comments).

##### Preview features

- \[syntax-errors] Tuple unpacking in `for` statement iterator clause
before Python 3.9
([#&#8203;16558](https://redirect.github.com/astral-sh/ruff/pull/16558))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit renames the invocation of `python` to `python3` in the
tests.

While many systems now alias `python` to `python3`, this behavior is not
guaranteed across all environments and is often configured by the user,
rather than provided by the operating system directly.

Explicitly using `python3` ensures that the tests are executed with the
intended Python 3 interpreter, regardless of user-specific
configurations,
and therefore improves the portability and reliability of the test
suite.
…tors#1224)

This commit adds a docstring to the jinja template file to prevent it
from being empty.
…-generators#1211)

Closes
openapi-generators#1203

---------

Co-authored-by: Dylan Anthony <43723790+dbanty@users.noreply.github.com>
…ed unions (openapi-generators#1216)

I’ve found a corner case, I think due to changes to Pydantic’s [smart
mode](https://docs.pydantic.dev/latest/concepts/unions/#smart-mode) for
disambiguating unions, where a subdocument with a `$ref` key and
additional keys (title, description, etc) is validated as a `Schema`
instead of as a `Reference` model. I believe these should be ignored per
["any properties added SHALL be
ignored"](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#reference-object)
() This was a problem for me since I want to use a reference to an enum
as a header parameter in FastAPI. The OpenAPI document generated by
FastAPI included several fields (title, description, etc) along with
`$ref`. The`Schema` instance it was validate to lacked any actual type
constraint information, so openapi-python-client needed to treat this as
an `AnyParameter`, and disallowed it in headers.

I have attached an example OpenAPI document
[`oa.json`](https://github.com/user-attachments/files/19170207/oa.json)
you can use to replicate this with the current `openapi-python-client`,
or you can use the test cases from the first commit in this PR, which
resolves it by using a Pydantic discriminated union testing for the
presence of `$ref` for all the unions including `Reference`.

(I had created an [issue
upstream](kuimono/openapi-schema-pydantic#36),
but figured I'd share the workaround here.)

---------

Co-authored-by: Natarajan Krishnaswami <nkrish@acm.org>
Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
…ors#1225)

Replaces openapi-generators#1156

---------

Co-authored-by: Eli Bishop <eli.bishop@benchling.com>
Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
> [!IMPORTANT]
> Merging this pull request will create this release

## Features

- allow Ruff to 0.10 (openapi-generators#1220)
- allow Ruff 0.11 (openapi-generators#1222)
- Allow any `Mapping` in generated `from_dict` functions (openapi-generators#1211)

## Fixes

### Always parse `$ref` as a reference

If additional attributes were included with a `$ref` (for example
`title` or `description`), the property could be
interpreted as a new type instead of a reference, usually resulting in
`Any` in the generated code.
Now, any sibling properties to `$ref` will properly be ignored, as per
the OpenAPI specification.

Thanks @nkrishnaswami!

Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…pi-generators#1228)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/download-artifact](https://redirect.github.com/actions/download-artifact)
| action | minor | `v4.1.9` -> `v4.2.0` |

---

### Release Notes

<details>
<summary>actions/download-artifact (actions/download-artifact)</summary>

###
[`v4.2.0`](https://redirect.github.com/actions/download-artifact/releases/tag/v4.2.0)

[Compare
Source](https://redirect.github.com/actions/download-artifact/compare/v4.1.9...v4.2.0)

#### What's Changed

- Update README.md by
[@&#8203;lkfortuna](https://redirect.github.com/lkfortuna) in
[https://github.com/actions/download-artifact/pull/384](https://redirect.github.com/actions/download-artifact/pull/384)
- Bump artifact version, do digest check by
[@&#8203;GhadimiR](https://redirect.github.com/GhadimiR) in
[https://github.com/actions/download-artifact/pull/383](https://redirect.github.com/actions/download-artifact/pull/383)

#### New Contributors

- [@&#8203;lkfortuna](https://redirect.github.com/lkfortuna) made their
first contribution in
[https://github.com/actions/download-artifact/pull/384](https://redirect.github.com/actions/download-artifact/pull/384)
- [@&#8203;GhadimiR](https://redirect.github.com/GhadimiR) made their
first contribution in
[https://github.com/actions/download-artifact/pull/383](https://redirect.github.com/actions/download-artifact/pull/383)

**Full Changelog**:
actions/download-artifact@v4.1.9...v4.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-generators#1231)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/upload-artifact](https://redirect.github.com/actions/upload-artifact)
| action | patch | `v4.6.1` -> `v4.6.2` |

---

### Release Notes

<details>
<summary>actions/upload-artifact (actions/upload-artifact)</summary>

###
[`v4.6.2`](https://redirect.github.com/actions/upload-artifact/releases/tag/v4.6.2)

[Compare
Source](https://redirect.github.com/actions/upload-artifact/compare/v4.6.1...v4.6.2)

#### What's Changed

- Update to use artifact 2.3.2 package & prepare for new upload-artifact
release by [@&#8203;salmanmkc](https://redirect.github.com/salmanmkc) in
[https://github.com/actions/upload-artifact/pull/685](https://redirect.github.com/actions/upload-artifact/pull/685)

#### New Contributors

- [@&#8203;salmanmkc](https://redirect.github.com/salmanmkc) made their
first contribution in
[https://github.com/actions/upload-artifact/pull/685](https://redirect.github.com/actions/upload-artifact/pull/685)

**Full Changelog**:
actions/upload-artifact@v4...v4.6.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…pi-generators#1230)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/download-artifact](https://redirect.github.com/actions/download-artifact)
| action | patch | `v4.2.0` -> `v4.2.1` |

---

### Release Notes

<details>
<summary>actions/download-artifact (actions/download-artifact)</summary>

###
[`v4.2.1`](https://redirect.github.com/actions/download-artifact/compare/v4.2.0...v4.2.1)

[Compare
Source](https://redirect.github.com/actions/download-artifact/compare/v4.2.0...v4.2.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…i-generators#1189)

Resolves openapi-generators#1188.

The change is simply to store a list, rather than a generator
expression.

The new `models_init.py.jinja` template in the end-to-end tests shows
that this now works. Without the fix in `openapi.py`, this template is
rendered with nothing under the `Using "openapi.models"` and `Using
"openapi.enums"` headings.

This fix is somewhat important for our use case, because we need to put
some code in `models/__init__.py` that is aware of what the model class
names and modules are. Without the fix, the only way to get this would
be to iterate over `imports`, which gives you strings like `from
.module_name import ClassName`, and then parse those strings, which is
workable but pretty clunky.
> [!IMPORTANT]
> Merging this pull request will create this release

## Fixes

### Make lists of models and enums work correctly in custom templates

Lists of model and enum classes should be available to custom templates
via the Jinja
variables `openapi.models` and `openapi.enums`, but these were being
passed in a way that made
them always appear empty. This has been fixed so a custom template can
now iterate over them.

Closes openapi-generators#1188.

Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Adding support for named enums via an optional extension,
`x-enum-varnames`.

This extension is added to the schema inline with the `enum` definition:
```
 "Siva.e_Install_State": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          99
        ],
        "type": "integer",
        "format": "int32",
        "x-enum-varnames": [
          "Deinstalled",
          "Installed",
          "Upcoming_Site",
          "Lab_Site",
          "Pending_Deinstall",
          "Suspended",
          "Install_In_Progress",
          "Unknown"
        ]
      },
```


The result:

![image](https://github.com/user-attachments/assets/780880b3-2f1f-49be-823b-f9abb713a3e1)

---------

Co-authored-by: Barry Barrette <bbarrette@sonifi.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
> [!IMPORTANT]
> Merging this pull request will create this release

## Features

### Adding support for named integer enums

openapi-generators#1214 by @barrybarrette

Adding support for named integer enums via an optional extension,
`x-enum-varnames`.

This extension is added to the schema inline with the `enum` definition:
```
"MyEnum": {
    "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        99
    ],
    "type": "integer",
    "format": "int32",
    "x-enum-varnames": [
        "Deinstalled",
        "Installed",
        "Upcoming_Site",
        "Lab_Site",
        "Pending_Deinstall",
        "Suspended",
        "Install_In_Progress",
        "Unknown"
    ]
}
```

The result:

![image](https://github.com/user-attachments/assets/780880b3-2f1f-49be-823b-f9abb713a3e1)

Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…nerators#1234)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/setup-python](https://redirect.github.com/actions/setup-python)
| action | minor | `v5.4.0` -> `v5.5.0` |

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

###
[`v5.5.0`](https://redirect.github.com/actions/setup-python/compare/v5.4.0...v5.5.0)

[Compare
Source](https://redirect.github.com/actions/setup-python/compare/v5.4.0...v5.5.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot and others added 2 commits April 20, 2025 03:25
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/openapi-generators/openapi-python-client).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzguMCIsInVwZGF0ZWRJblZlciI6IjM5LjIzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants