Skip to content

Commit

Permalink
Release 0.1.0-rc.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-foster committed Sep 6, 2023
1 parent a4b9bf2 commit 325ac3d
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## 0.1.0-rc.0

**Breaking**: This is a major release.
See the [migration guide](guides/migration.md) for more information.
**Add**: Plugin system for overriding the behavior of this library.
See the [plugins guide](guides/plugins.md) for more information.
**Add**: Additional internal types to represent string variations, enums, etc.
**Fix**: Uniformly normalize names of operations and schemas.

### 0.0.7 (2023-06-07)

**Add**: `schema_use` option to add optional `use [Module]` statements within schemas.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add the dependency in `mix.exs`:
```elixir
def deps do
[
{:oapi_generator, "~> 0.0.7"}
{:oapi_generator, "0.1.0-rc.0"}
]
end
```
Expand Down
8 changes: 6 additions & 2 deletions guides/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ Remember that all configuration values must be contained within a profile.
Defaults to an empty list of merges.
See `OpenAPI.Processor.Naming.merge_schema/2` for more information.

* `naming.operation_use_tags`: Whether to use tags when determining module names for operations.
Defaults to `true`.
See `OpenAPI.Processor.Naming.operation_modules/2` for more information.

* `naming.rename`: List of tuples containing patterns and replacements to use when renaming modules.
Defaults to an empty list of replacements.
See `OpenAPI.Processor.Naming.rename_schema/2` for more information.
Expand Down Expand Up @@ -283,12 +287,12 @@ Remember that all configuration values must be contained within a profile.
Defaults to no used module.
See `OpenAPI.Renderer.Module.render_using/2` for more information.

* `output_schema_subdirectory`: Subdirectory to use for all rendered files containing only schemas.
* `output.schema_subdirectory`: Subdirectory to use for all rendered files containing only schemas.
This is an optional way to colocate generated schema modules in a single directory away from other parts of the client library.
Defaults to the same location as `output.location`.
See `OpenAPI.Renderer.Module.filename/2` for more information.

* `output_schema_use`: Module to include as a `use` statement at the top of every module containing only schemas.
* `output.schema_use`: Module to include as a `use` statement at the top of every module containing only schemas.
Defaults to no used module.
See `OpenAPI.Renderer.Module.render_using/2` for more information.

Expand Down
51 changes: 51 additions & 0 deletions guides/migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Migration Guide

This document assists in the migration across breaking changes of the library.

## 0.0.x to 0.1.0

This version change represents a major rewrite of the core logic of the library.
There are many new features, such as the ability to override the default implementation of most parts of the processing and rendering of the code.
To facilitate this, much of the configuration has moved.

### Move Configuration

Within a configuration profile, make the following changes to configuration keys:

* `base_location` -> `output.location`
* `base_module` -> `output.base_module`
* `default_client` -> `output.default_client`
* `extra_fields` -> `output.extra_fields`
* `group` -> `naming.group`
* `merge` -> `naming.merge`
* `operation_default_module` -> `naming.default_operation_module`
* `operation_location` -> `output.operation_subdirectory`
* `operation_use_tags` -> `naming.operation_use_tags`
* `rename` -> `naming.rename`
* `schema_location` -> `output.schema_subdirectory`
* `schema_use` -> `output.schema_use`
* `types` -> `output.types`

For example, if your configuration previously had the following:

```elixir
config :oapi_generator, default: [
base_module: MyClient
]
```

Now, you should have:

```elixir
config :oapi_generator, default: [
output: [
base_module: MyClient
]
]
```

### Adopt New Types

There are new (and modified) internal representations of types returned from `field/1` schema functions.
If you use this information in a typed decoder, for example, it is necessary to adopt the new types.
See `OpenAPI.Processor.Type` for more information.
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule OpenAPI.MixProject do
use Mix.Project

@version "0.0.7"
@version "0.1.0-rc.0"
@source_url "https://github.com/aj-foster/open-api-generator"

def project do
Expand Down

0 comments on commit 325ac3d

Please sign in to comment.