diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..b24eaf93
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,37 @@
+## Description of the change
+
+> Description here
+
+## Type of change
+- [ ] Bug fix (non-breaking change that fixes an issue)
+- [ ] New feature (non-breaking change that adds functionality)
+- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
+- [ ] Configuration change
+- [ ] Technical Debt
+- [ ] Documentation
+
+## Related tickets
+
+> Link to Shortcut/Jira Ticket Goes Here
+
+## Checklists
+
+### Development and Testing
+
+- [ ] Lint rules pass locally.
+- [ ] The code changed/added as part of this pull request has been covered with tests, or this PR does not alter production code.
+- [ ] All tests related to the changed code pass in development, or tests are not applicable.
+
+### Code Review
+
+- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached.
+- [ ] At least two engineers have been added as "Reviewers" on the pull request.
+- [ ] Changes have been reviewed by at least two other engineers who did not write the code.
+- [ ] This branch has been rebased off master to be current.
+
+### Tracking
+- [ ] Issue from Shortcut/Jira has a link to this pull request.
+- [ ] This PR has a link to the issue in Shortcut.
+
+### QA
+- [ ] This branch has been deployed to staging and tested.
diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml
index e2cf4200..f8dee5a7 100644
--- a/.github/workflows/elixir.yml
+++ b/.github/workflows/elixir.yml
@@ -12,17 +12,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- otp: ['25']
- elixir: ['1.13']
+ otp: ["26"]
+ elixir: ["1.16"]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
id: beam
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: PLT cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
@@ -34,7 +34,8 @@ jobs:
- run: mix compile --warnings-as-errors
- run: mix format --check-formatted
- run: mix credo --strict --all
- - run: mix dialyzer
+ - run: mix dialyzer --format github
+ - run: mix docs --warnings-as-errors
test_examples:
runs-on: ubuntu-latest
@@ -42,12 +43,13 @@ jobs:
env:
MIX_ENV: test
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
+ id: beam
with:
- otp-version: 24
- elixir-version: 1.13
- - uses: actions/cache@v2
+ otp-version: 26
+ elixir-version: 1.16
+ - uses: actions/cache@v4
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plug-build
@@ -61,24 +63,28 @@ jobs:
run: mix do deps.get, test
test:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
name: Test (OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}})
strategy:
matrix:
- otp: ['22', '23', '24', '25']
- elixir: ['1.10', '1.11', '1.12', '1.13']
+ otp: ["24", "25", "26"]
+ elixir: ["1.14", "1.15", "1.16", "1.18"]
+ # Test each elixir version with lowest and highest compatible OTP version, exclude others
+ # See https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp
exclude:
- - {otp: '24', elixir: '1.10'}
- - {otp: '25', elixir: '1.10'}
- - {otp: '25', elixir: '1.11'}
- - {otp: '25', elixir: '1.12'}
+ - { otp: "24", elixir: "1.14" }
+ - { otp: "24", elixir: "1.18" }
+ - { otp: "25", elixir: "1.14" }
+ - { otp: "25", elixir: "1.15" }
+ - { otp: "25", elixir: "1.16" }
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
+ id: beam
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- - uses: actions/cache@v2
+ - uses: actions/cache@v4
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-build
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 43bd864f..2745d1a2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,7 +16,7 @@ jobs:
id: beam
with:
otp-version: 25
- elixir-version: 1.13
+ elixir-version: 1.14
- id: deps
name: Fetch and compile dependencies
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 96af969f..a10fe5cf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,71 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## v3.21.2 - 2024-10-02
+
+* Use latest version of SwaggerUI by default, but allow it to be configured by @jarmo in https://github.com/open-api-spex/open_api_spex/pull/628
+* Exporting to YAML preserves nil values in examples by @zorbash in f3cd32bee2a
+
+## v3.21.1 - 2024-09-17
+
+* Fix schema inspection argument error by @zorbash. https://github.com/open-api-spex/open_api_spex/issues/636
+
+## v3.21.0 - 2024-09-12
+
+* Update dev dependencies and example apps by @zorbash in https://github.com/open-api-spex/open_api_spex/pull/624
+* Support casting decimals by @zorbash in https://github.com/open-api-spex/open_api_spex/pull/634
+* Support decoding operations with :servers. by @loguntsov in https://github.com/open-api-spex/open_api_spex/pull/635
+
+## v3.20.1 - 2024-07-31
+
+* Support custom error messages in custom validators by @GregorGrasselli in https://github.com/open-api-spex/open_api_spex/pull/621
+* Update Schema.example/2 typespec to allow references by @zorbash in 5ec452f
+
+## v3.20.0 - 2024-07-10
+
+* Respect minLength when generating string examples by @zorbash in https://github.com/open-api-spex/open_api_spex/pull/608
+* Accept read_write_scope from opts when calling cast functions directly by @albertored in https://github.com/open-api-spex/open_api_spex/pull/572
+* Allow Poison v6 to be used by @hkrutzer in https://github.com/open-api-spex/open_api_spex/pull/616
+* chore: Drop build matrix support for elixir 1.11, 1.12, 1.13 and OTP 22 by @mbuhot in https://github.com/open-api-spex/open_api_spex/pull/619
+* improvement: use struct spec to avoid double `%` in struct inspect by @zachdaniel in https://github.com/open-api-spex/open_api_spex/pull/613
+* Feat: add `--check` option in Mix tasks to compare the generated spec with a previously generated file by @davidebriani in https://github.com/open-api-spex/open_api_spex/pull/618
+* fix: cast numbers as floats by @David-Klemenc in https://github.com/open-api-spex/open_api_spex/pull/611
+
+## v3.19.1 - 2024-05-17
+
+* Add notice that body params are not merged into Conn.params whne using cast and validate plug by @hamir-suspect in #589
+* Set nonces on `
-
-
+
+ <%= if script_src_nonce do %>
+
-