Changelog
View Sourcev0.8.5 - 2025-08-25
- Add priv directory to the package definition
- Allow minor version updates of dependencies. Thanks to @newmanjeff
v0.8.4 - 2025-05-29
- swagger-ui-dist updated to 5.2.0.
- Fix validation of boolean properties. Thanks to @charl3sj
- Allow nullable
$ref. Thanks to @ericsullivan - Nullable fields validated correctly. Thanks to @ericsullivan
- Add support SwaggerUI config object injection. Thanks to @heroinbob
- Add support to have property names with
-symbol. Thanks to @fahadnaeemkhan - Documentation improvements. Thanks to @kianmeng and @leticiapenha
- Use Elixir formatter. Thanks to @naps62
- Remove ex_json_schema from startup. Thanks to @lukaszsamson
- Update dependencies and phoenix_swagger itself for Elixir >= 1.16.0
v0.8.3 - 2021-01-15
- Fix broken param parsing caused from Plug 1.11.0
- Allow swagger ui validator url to be customized
validatorUrlreplaced withconfigUrl- Warning messages fixed for Elixir 1.11
- dialyxir, plug, ex_json_schema and other dependencies are updated to the latests versions
v0.8.2 - 2019-12-12
- Add support for Phoenix ~> 1.4.9
- Ability to configure json library e.g. config
:phoenix_swagger, json_library: Jason - Improvements in SwagerUI Plug
- Update dependencies
- Bug fixes
v0.8.1 - 2018-07-06
- Fix for crash on non-GET requests
- Fix compilation error running
mix phx.swagger.generatebeforemix compile - Validate number type in query parameter
- Add
idandtypeproperties to theincluded-items schema - Add
Schema.nullablefunction to set thex-nullableproperty - Add
nullable:option toJsonSchema.relationshipfunction - Handle
x-nullableschemas inSchemaTest - Add
deprecatedflag for operations
v0.8.0 - 2018-03-13
Passing module names and output path as mix task parameters is no longer supported.
Inferring default module names from mix project is no longer supported.
Swagger file outputs, router module and optional endpoint module must now be specified in application config:
config :my_app, :phoenix_swagger, swagger_files: %{ "priv/static/swagger.json" => [router: MyAppWeb.Router, endpoint: MyAppWeb.Endpoint], # additional swagger files here }phoenix_swaggercan now be run as a mix compiler task, ensuring that the generated swagger is kept in sync with code, and enabling live reloading.compilers: [:phoenix, :gettext, :phoenix_swagger] ++ Mix.compilersThe HTTP verb and path can now be inferred from the phoenix router:
swagger_path :show do get "/api/users/{id} description "Gets a user by ID" response 200, "OK", Schema.ref(User) endCan now be written without the
get:swagger_path :show do description "Gets a user by ID" response 200, "OK", Schema.ref(User) endNote that if your controller contains a
delete/2function (such as when using theresourcesconvention), then callingdelete/2fromPhoenixSwagger.Pathwill now cause a compilation error. To avoid this problem, include the full module (shown below), or simply remove the line and allow the verb and path to be inferred from the route:swagger_path(:delete) do PhoenixSwagger.Path.delete "/api/users/{id}" summary "Delete User" end
v0.7.1 - 2017-11-09
- Use the :load_from_system_env Endpoint config flag to detect dynamic host and port configuration
v0.7.0 - 2017-11-09
- Minor fix that supports the Phoenix 1.3 namespacing, where it is {Project}Web instead of {Project}.Web.
- Add support for has_many relationships for JSON-API resource schemas
- Upgrade to swagger-ui 3.1.7
- Tests for nested and non-nested required parameters for
PhoenixSwagger.Plug.Validate. - Decode parameter names using
Plug.Conn.Query.decodeand walkconn.paramsto find the nested param asconn.paramsis already nested whileparameter["name"]is not when received byPhoenixSwagger.Plug.Validate.validate_query_params/2.
v0.6.4 - 2017-07-15
- Adds support to enable security by endpoint
PhoenixSwagger.Plug.Validatesets response content type on error toapplication/jsonPhoenixSwagger.Plug.Validateaccepts:validation_failed_statusoption, defaults to 400- Example application includes usage of validator
v0.6.3 - 2017-06-17
- Adds support for custom Endpoint module names by passing
--endpoint - Added patch request support
v0.6.2 - 2017-05-09
- fix path assignation of a swagger specification file in UI plug
- add
disable_validatoroption to disable/enable validation of a swagger schema.
v0.6.1 - 2017-05-09
- Provide default host and port when generating swagger host config
- Suppress host config when dynamic hostname or port are used
v0.6.0 - 2017-05-03
- Use phoenix 1.3 conventions for mix tasks and module names
- Add
PhoenixSwagger.SchemaTestmodule for response validation - Swagger UI plug redirects / to /index.html automatically avoiding errors when fetching assets.
- Swagger UI configured to list all operations by default
v0.5.1 - 2017-03-29
- Allow property schemas to be declared inline using
Schema.newmacro - Allow schemas to include an example
- Add support for
discriminatorin polymorphic schemas - Do not set a host if a url has not been provided
- Ability to validate boolean values
v0.5.0 - 2017-03-13
- Include swagger-ui plug
PhoenixSwagger.Plug.SwaggerUI - Allow for a list of types on
PhoenixSwagger.Schema.type - Fix not running all doctests
- Fix
ArgumentErrorinPhoenix.Swagger.Generatewhen routing to plug with keyword opts #58
v0.4.2 - 2017-02-22
- Fix FunctionClauseError in
responsewhen noproducesmime type defined on an operation.
v0.4.1 - 2017-02-21
- Fix compilation errors when using
PhoenixSwagger.JsonApimacros
v0.4.0 - 2017-02-20
- Add
PhoenixSwagger.Schemamodule that provides a structure which represents swagger schema. - Add
swagger_schemamacro to build a swagger schema. - New JSON-API helpers.
- Provide documentation with ex_doc.
- And other changes from @everydayhero fork.