Commit 1047c32
Sync with upstream open_api_spex (through v3.22.3) (#4)
* Fix deprecation warning on Elixir 1.15, require Elixir 1.11, adapt CI (open-api-spex#550)
* Fix deprecation warning on Elixir 1.15
* Stop testing against Elixir 1.10
* Require Elixir 1.11+ now
* Update CHANGELOG.md
* Add `--quiet` option for spec generation (open-api-spex#557)
* Fix casting non-objects against discriminator open-api-spex#551 (open-api-spex#552)
Co-authored-by: Gianluca Nitti <gianluca.nitti@voismart.it>
* Bump credo version to 1.7.0
* Bump dialyxir to 1.3.0
* feat: add assert_operation_response, assert_raw_schema (open-api-spex#545)
* feat: add assert_operation_response, assert_raw_schema
* make assert_operation_response pipeable
* fix return type
* automagically infer operationId in assertion
* don't need to resolve a %Schema{}
* ignore 204s
* use OpenApiSpex.OpenApi.json_encoder()
* rename test to match fn
* reorganize json_encoder check per feedback
* update json_encoder message for :jason or :poison
* use a regex to match json content types in validate_operation_response
* 💅 feedback - types, error message, module attrib for regex
* add doc for content_type_from_header
* remove no_return from spec
* Release version 3.18.0
* Document the spec export task `--filename` option
* Docstest Operation.parameter/5
* Cast discriminator when no title present (open-api-spex#574)
Co-authored-by: Alberto Sartori <alberto.sartori@hpe.com>
* Exclude empty paths from spec (open-api-spex#583)
* Exclude empty paths from spec
* fix: assert_operation_response header lookup (open-api-spex#584)
* fix: assert_operation_response header lookup
* Release version 3.18.1
* Fix 'AllOf cast returns a map, but I expected a struct' (open-api-spex#592)
* Add failing test
* Cast result of AllOf cast into a struct
* Shorter module name
* Add missing NoneCache test
* Release version 3.18.2
* Relax dependency constraint on ymlr to allow version ~> 5.0 (open-api-spex#586)
* relax dependency on ymlr, and fix some tests
* test with more elixir versions
* Update Elixir version test matrix (open-api-spex#602)
* Update Elixir version test matrix
* Fix map key order dependent test
* Release version 3.18.3
* Support response code ranges
See: https://swagger.io/docs/specification/describing-responses/
* Release version 3.19.0
* Add notice that body params are not merged into Conn.params whne using cast and validate plug (open-api-spex#589)
* Set nonces on <script> and <style> elements if configured (open-api-spex#593)
* Allow script and style nonces
* Allow nonces on the SwaggerUIOAuth2Redirect plug as well
* fix: ensure operation_id is always set on conn.private (open-api-spex#606)
* fix: ensure operation_id is always set on conn.private when an operation is known
* Fix grammer (open-api-spex#607)
* Release version 3.19.1
* Respect minLength when generating string examples (open-api-spex#608)
* sets read_write_scope from opts, this will permit to comply to readOnly (open-api-spex#572)
* Allow Poison v6 to be used (open-api-spex#616)
* chore: Drop build matrix support for elixir 1.11, 1.12, 1.13 and OTP 22 (open-api-spex#619)
* improvement: use struct spec to avoid double `%` in struct inspect (open-api-spex#613)
* improvement: use struct spec to avoid double `%` in struct inspect
currently, inspecting an `OpenApiSpex.Schema` looks like this:
`%OpenApiSpex.Schema%{type: :object}`
with the new change, it looks like this:
`%OpenApiSpex.Schema{type: :object}`
which allows copy/pasting the struct
* Feat: add --check option in Mix tasks to compare generated spec w/ file (open-api-spex#618)
Add a --check option to run Mix tasks and compare the generated spec
with a previously generated file.
This is useful for scenarios where a CI check is desirable to catch
unwanted drifts from a validated OpenAPI spec: e.g. the OpenAPI spec is
committed and reviewed, and should not change without additional review.
Fixes open-api-spex#617
Signed-off-by: Davide Briani <davide@briani.dev>
* fix: cast numbers as floats (open-api-spex#611)
* Release version 3.20.0
* Update Elixir version in release action
* Set otp-version to 25 in release.yml
* Support custom error messages in custom validators (open-api-spex#621)
* Add custom message for custom validators
* Update Schema.example/2 typespec to allow references
* Release version 3.20.1
* Update dev dependencies and example apps (open-api-spex#624)
* Support casting decimals (open-api-spex#634)
* Update decode.ex to support servers in operations (open-api-spex#635)
Fix typo
* Update spec fixture to test open-api-spex#635
* Release version 3.21.0
* Fix schema inspect argument error in IEx
* Release version 3.21.1
* Upgrade SwaggerUI to version 5.17.14 and allow assets URLs to be configured via Plug options (open-api-spex#628)
* fix: Exporting to YAML preserves nil values in examples
* Release version 3.21.2
* Fix cast x-validate when decoded schema (open-api-spex#647)
* Fix cast x-validate when decoded schema
* fix credo complain when using apply/3
---------
Co-authored-by: Giorgio Torres <giorgio.torres@hpe.com>
* Bump CI dependencies (open-api-spex#655)
* Add examples property to Schema (open-api-spex#654)
Fixes open-api-spex#653
* Document schema resolver duplicate titles behaviour (open-api-spex#656)
* Add spec.yaml tasks to example applications (open-api-spex#657)
* Add mix spec.yaml tasks in example applications
* Update example application dependencies
* Fix 1.18 compilation warnings (open-api-spex#665)
* Fix Elixir 1.18 compilation warnings
* Test against 1.18
* Check for ex_doc warnings in CI and bump devtest deps (open-api-spex#666)
* Test array query params in example phoenix app (open-api-spex#667)
* Release 3.21.3
* Fix OTP-28 support (open-api-spex#672)
* Refactor: Update default parsers and schema pattern definitions
This commit introduces changes to `OpenApiSpex.CastParameters` and `OpenApiSpexTest.Schemas`.
- Moved `@default_parsers` to a private function `default_parsers/0` in `OpenApiSpex.CastParameters` to ensure it's evaluated at runtime, preventing potential compilation issues with `OpenApi.json_encoder()`.
- Updated the `pattern` definition in `OpenApiSpexTest.Schemas` to use a string literal instead of a regex literal for consistency and to avoid potential issues with regex compilation.
Fix: Adjust string pattern test assertion
Following the refactoring, a test in `OpenApiSpex.CastStringTest` failed due to a change in how regex patterns were handled. This fix corrects the assertion for string pattern matching to compare the `source` of the regex instead of the regex struct directly, resolving the test failure.
* Fix formatting
---------
Co-authored-by: Dimitris Zorbas <dimitrisplusplus@gmail.com>
* Release version 3.21.4
* Fix assert_operation_response/2 references (open-api-spex#673)
* Support references in assert_operation_response/2
* fixup! Support references in assert_operation_response/2
* Release version 3.21.5
* Support multiple apps in Plug.SwaggerUI (open-api-spex#676)
* Validate keys given to operation/2 macro (open-api-spex#675)
* Release version 3.22.0
* Fix elixir 1.19 support (open-api-spex#685)
* Release version 3.22.1
* fix: type warnings Elixir 1.19 (open-api-spex#693)
Thanks @davydog187 !
* Release version 3.22.2
* chore: removed unused require(s) (open-api-spex#700)
* Relax decimal requirement (open-api-spex#702)
A new release will be out soon, this will allow users to migrate if desired.
The new version is compatible with OpenAPISpex.
* Release version 3.22.3
---------
Signed-off-by: Davide Briani <davide@briani.dev>
Co-authored-by: Thibaut Barrère <thibaut.barrere@gmail.com>
Co-authored-by: Brice Thomas <brice.p.thomas@gmail.com>
Co-authored-by: Gianluca Nitti <gianluca.nitti96@gmail.com>
Co-authored-by: Gianluca Nitti <gianluca.nitti@voismart.it>
Co-authored-by: Dimitris Zorbas <dimitrisplusplus@gmail.com>
Co-authored-by: Matt Sutkowski <msutkowski@gmail.com>
Co-authored-by: Alberto Sartori <alberto.sartori@athonet.com>
Co-authored-by: Alberto Sartori <alberto.sartori@hpe.com>
Co-authored-by: Alisina Bahadori <alisina.bm@gmail.com>
Co-authored-by: Angelika Tyborska <angelikatyborska@fastmail.com>
Co-authored-by: Aleksandr Lossenko <aleksandr.lossenko@memsource.com>
Co-authored-by: Amir Hasanbasic <43892661+hamir-suspect@users.noreply.github.com>
Co-authored-by: Nathan Alderson <me@nathanalderson.com>
Co-authored-by: E. Sambo <news@emmanuelsambo.com>
Co-authored-by: Alberto Sartori <alberto.sartori.as@gmail.com>
Co-authored-by: Hans Krutzer <git@pixelspaceships.com>
Co-authored-by: Mike Buhot <m.buhot@gmail.com>
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
Co-authored-by: Davide Briani <60540759+davidebriani@users.noreply.github.com>
Co-authored-by: David-Klemenc <44705886+David-Klemenc@users.noreply.github.com>
Co-authored-by: GregorGrasselli <GregorGrasselli@users.noreply.github.com>
Co-authored-by: Sergey Loguntsov <loguntsov@list.ru>
Co-authored-by: Jarmo Pertman <jarmo@jarmopertman.com>
Co-authored-by: Giorgio Primola <torres.giorgio@icloud.com>
Co-authored-by: Giorgio Torres <giorgio.torres@hpe.com>
Co-authored-by: Georges Dubus <georges.dubus@gmail.com>
Co-authored-by: Sergey Moiseev <moiseev.sergey@gmail.com>
Co-authored-by: David Pavlík <pavlik.d@seznam.cz>
Co-authored-by: Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com>
Co-authored-by: Dave Lucia <dave@tvlabs.ai>
Co-authored-by: José Valim <jose.valim@gmail.com>1 parent d60b6a5 commit 1047c32
83 files changed
Lines changed: 1845 additions & 568 deletions
File tree
- .github/workflows
- examples
- phoenix_app
- config
- lib
- phoenix_app_web
- controllers
- phoenix_app
- accounts
- test
- phoenix_app_web/controllers
- support
- plug_app
- config
- lib/plug_app
- lib
- mix/tasks
- open_api_spex
- cast
- inspect
- open_api
- plug
- test
- test
- cast
- inspect
- mix/tasks
- open_api
- plug
- support
- tasks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | | - | |
49 | | - | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | | - | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
69 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
8 | 105 | | |
9 | 106 | | |
10 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | | - | |
30 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
40 | | - | |
41 | | - | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
91 | | - | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
42 | 52 | | |
43 | 53 | | |
44 | | - | |
45 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
| |||
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 70 | + | |
62 | 71 | | |
63 | 72 | | |
64 | 73 | | |
| |||
0 commit comments