v0.7.0 (2026-08-06)
Breaking release. Oasis 0.7 replaces its JSON Schema engine and changes several public APIs PR #3. Read the 0.7 migration guide before upgrading.
Breaking changes
- JSON Schema engine: replace
ex_json_schemawithjsonschex ~> 0.9.0for JSON Schema Draft 2020-12 compilation and validation.ex_json_schemais removed, so checked-in generated modules containing%ExJsonSchema.Schema.Root{}must be regenerated before they compile. Oasis.Spec.read/1: successful reads now return%Oasis.Spec.Document{}instead of%ExJsonSchema.Schema.Root{}. Handwritten integrations must use compiled%JSONSchex.Types.Schema{}values;Oasis.Spec.Utils.expand_ref/1is removed.- Validation errors: rename the
JsonSchemaValidationFailedsuffix toOasis.BadRequestError.JSONSchemaValidationFailed. - Token and authentication statuses: public token helpers and generated callbacks return string statuses such as
"expired","invalid","missing", and"invalid_token"instead of atoms. Plug adapters continue to accept known legacy atom results from custom callbacks. - Decoded-map generation: raw OpenAPI maps are strict by default. Callers using Oasis's legacy pre-grouped parameter maps must explicitly pass
normalized_parameters: truetoMix.Oasis.new/2. - Handwritten JSON pipelines: configure
Oasis.CacheRawBodyReaderas thePlug.Parsersbody reader. Oasis now fails closed when it cannot distinguish primitive or empty JSON bodies from Plug's map-shaped representations.
Highlights
- Resolve structural OpenAPI Reference Objects with
JSONSchex.Ref.resolve_selected/2while preserving Schema Object$refs for JSONSchex. Local and external Security Scheme refs are resolved before generation; invalid structural targets return source-awareOasis.InvalidSpecErrorvalues. - Bundle reachable JSON Schema fragments with JSONSchex, including external resources, recursive schemas, custom loaders, and deep rebasing of unselected refs. Generation always uses one resolved loader call; callers may provide
:loaderor passloader: nilto disable external loading. - Preserve HTTP coercion for parameter, primitive-body, form, and multipart schemas behind
$refs, including refs scoped beneath nested$idresources. JSONSchex remains the authority for final validation and asserted formats. - Distinguish explicit JSON
nulland{}from absent bodies through raw-body provenance; match parameterizedapplication/*+jsonand wildcard media ranges; reject ambiguous, unmatched, and unparsed bodies instead of skipping validation. Primitive roots remain under Plug's_jsonmap key. - Preserve JSONSchex's native leaf-first errors while deriving deterministic root-first URI-fragment JSON Pointers for Oasis error reporting, nested arrays, and uploaded files.
- Support single-entry Parameter Objects using
content, correctprefixItemscoercion for short arrays and typed tails, and allow multipart uploads only through applicable explicitbinary/bytestring schemas. Overlapping schemas, applicators, and active conditionals are evaluated fail-closed. - Keep JSONSchex's standalone bundles verbatim, preserving custom vocabularies and OpenAPI Schema Object annotations. Generated support pre-plugs are reconciled with production templates, including JSONSchex macros, raw-body readers, notices, and
super(opts)behavior. - Rewrite HMAC date examples with standard-library ISO 8601 parsing and update generated callback examples to use string statuses.
Mix.Oasis.Router.source_metanow documents logical operation/input identities rather than exact external-reference targets.
v0.6.0 (2026-01-29)
- Fix compile fail
inspect_as_structin Elixir 1.19 - Fix compile warning and test cases in Elixir 1.19
v0.5.2 (2025-02-20)
- Fix compile warning in Elixir 1.18
- Fix the broken source url in
mix.exs
v0.5.1 (2023-02-14)
- Fix to ensure validation and parse working when request header content type with charset (issue#15)
- Fix to adapt request body (via
Plug.Parsers.JSON) validation in a"_json"key wrapper (issue#19) - Adapt to use
conn.hostfor HMAC authorization when use Plug"1.14.0"(PR#18) - Update compile compatibility with Elixir
~> 1.14(PR#21)
v0.5.0 (2022-07-21)
- Fix test failed in OTP24
- Add HMAC based authentication implement (issue#8)
- Some fixing and enhancement (PR#12)
v0.4.3 (2021-05-13)
- Fix to make properly handle file uploads
v0.4.2 (2021-05-11)
- Add
--forceand--quietoptions for mix oas.gen.plug
v0.4.1 (2021-04-29)
Fix unexpected "..." string in generated pre_* module when a large number of parameters defined
v0.4.0 (2021-04-14)
- Improve errors handle and add a guide about it
v0.3.1 (2021-04-08)
- Fix incorrectly handle errors in generated plug module
- Simplify
handle_errors/2process in generatedpre_*module
v0.3.0 (2021-04-08)
- Add
conn.private.oasis_router - Add a specification extensions guide
- Support Security Scheme Object with Bearer Authentication
- Fix the order to override
x-oasis-name-spacefield
v0.2.1 (2021-03-24)
- Fix unexpected
:body_schemain generatedpre_*module
v0.2.0 (2021-03-23)
- Use
Oasis.Controller
v0.1.0 (2021-03-17)
- Implement some parts of OpenAPI definition
*Objectin parse - Implement a basic router and plugs pipeline process
- Add a mix task
mix task oas.gen.plugto generate code - 100% test coverage