Skip to content

Commit

Permalink
chore: prepare release 0.21.0 (#1053)
Browse files Browse the repository at this point in the history
This PR was created by Knope. Merging it will create a new release

### Breaking Changes

#### Removed the `update` command

The `update` command is no more, you can (mostly) replace its usage with
some new flags on the `generate` command.

If you had a package named `my-api-client` in the current working
directory, the `update` command previously would update the
`my_api_client` module within it. You can now _almost_ perfectly
replicate this behavior using `openapi-python-client generate
--meta=none --output-path=my-api-client/my_api_client --overwrite`.

The only difference is that `my-api-client` would have run `post_hooks`
in the `my-api-client` directory,
but `generate` will run `post_hooks` in the `output-path` directory.

Alternatively, you can now also run `openapi-python-client generate
--meta=<your-meta-type> --overwrite` to regenerate
the entire client, if you don't care about keeping any changes you've
made to the generated client.

Please comment on [discussion
#824](#824)
(or a new discussion, as appropriate) to aid in designing future
features that fill any gaps this leaves for you.

### Features

#### Added an `--output-path` option to `generate`

Rather than changing directories before running `generate` you can now
specify an output directory with `--output-path`.
Note that the project name will _not_ be appended to the
`--output-path`, whatever path you specify is where the
generated code will be placed.

#### Added an `--overwrite` flag to `generate`

You can now tell `openapi-python-client` to overwrite an existing
directory, rather than deleting it yourself before
running `generate`.

Co-authored-by: GitHub <github-actions@github.com>
  • Loading branch information
dbanty and GitHub authored Jun 8, 2024
1 parent 732b533 commit 8591f15
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 36 deletions.
9 changes: 0 additions & 9 deletions .changeset/added_an_output_path_option_to_generate.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/added_an_overwrite_flag_to_generate.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/remove_the_update_command.md

This file was deleted.

32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,38 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t

The 0.x prefix used in versions for this project is to indicate that breaking changes are expected frequently (several times a year). Breaking changes will increment the minor number, all other changes will increment the patch number. You can track the progress toward 1.0 [here](https://github.com/openapi-generators/openapi-python-client/projects/2).

## 0.21.0 (2024-06-08)

### Breaking Changes

#### Removed the `update` command

The `update` command is no more, you can (mostly) replace its usage with some new flags on the `generate` command.

If you had a package named `my-api-client` in the current working directory, the `update` command previously would update the `my_api_client` module within it. You can now _almost_ perfectly replicate this behavior using `openapi-python-client generate --meta=none --output-path=my-api-client/my_api_client --overwrite`.

The only difference is that `my-api-client` would have run `post_hooks` in the `my-api-client` directory,
but `generate` will run `post_hooks` in the `output-path` directory.

Alternatively, you can now also run `openapi-python-client generate --meta=<your-meta-type> --overwrite` to regenerate
the entire client, if you don't care about keeping any changes you've made to the generated client.

Please comment on [discussion #824](https://github.com/openapi-generators/openapi-python-client/discussions/824)
(or a new discussion, as appropriate) to aid in designing future features that fill any gaps this leaves for you.

### Features

#### Added an `--output-path` option to `generate`

Rather than changing directories before running `generate` you can now specify an output directory with `--output-path`.
Note that the project name will _not_ be appended to the `--output-path`, whatever path you specify is where the
generated code will be placed.

#### Added an `--overwrite` flag to `generate`

You can now tell `openapi-python-client` to overwrite an existing directory, rather than deleting it yourself before
running `generate`.

## 0.20.0 (2024-05-18)

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = [
"typing-extensions>=4.8.0,<5.0.0",
]
name = "openapi-python-client"
version = "0.20.0"
version = "0.21.0"
description = "Generate modern Python clients from OpenAPI"
keywords = [
"OpenAPI",
Expand Down

0 comments on commit 8591f15

Please sign in to comment.