Current section
43 Versions
Jump to
Current section
43 Versions
Compare versions
6
files changed
+25
additions
-6
deletions
| @@ -37,4 +37,4 @@ | |
| 37 37 | {<<"optional">>,false}, |
| 38 38 | {<<"repository">>,<<"hexpm">>}, |
| 39 39 | {<<"requirement">>,<<"~> 2.1">>}]]}. |
| 40 | - {<<"version">>,<<"0.5.2">>}. |
| 40 | + {<<"version">>,<<"0.5.3">>}. |
| @@ -110,7 +110,10 @@ defmodule ExOpenApiUtils do | |
| 110 110 | properties: request_properties_map, |
| 111 111 | tags: schema_definition.tags, |
| 112 112 | writeOnly: true, |
| 113 | - example: request_example |
| 113 | + example: request_example, |
| 114 | + extensions: %{ |
| 115 | + "order" => schema_definition.properties |
| 116 | + } |
| 114 117 | } |
| 115 118 | |
| 116 119 | request_module_contents = |
| @@ -148,7 +151,10 @@ defmodule ExOpenApiUtils do | |
| 148 151 | properties: response_properties_map, |
| 149 152 | tags: schema_definition.tags, |
| 150 153 | readOnly: true, |
| 151 | - example: response_example |
| 154 | + example: response_example, |
| 155 | + extensions: %{ |
| 156 | + "order" => schema_definition.properties |
| 157 | + } |
| 152 158 | } |
| 153 159 | |
| 154 160 | response_module_contents = |
| @@ -39,6 +39,7 @@ defmodule ExOpenApiUtils.Example.Business do | |
| 39 39 | required: [:name], |
| 40 40 | title: "Business", |
| 41 41 | description: "The Business", |
| 42 | + properties: [:name, :tenant], |
| 42 43 | tags: ["business"] |
| 43 44 | ) |
| 44 45 | end |
| @@ -42,5 +42,11 @@ defmodule ExOpenApiUtils.Example.Tenant do | |
| 42 42 | has_many(:users, User, foreign_key: :owner_id) |
| 43 43 | end |
| 44 44 | |
| 45 | - open_api_schema(required: [:name], title: "Tenant", description: "The Tenant", tags: ["Tenant"]) |
| 45 | + open_api_schema( |
| 46 | + required: [:name], |
| 47 | + title: "Tenant", |
| 48 | + description: "The Tenant", |
| 49 | + tags: ["Tenant"], |
| 50 | + properties: [:name, :users] |
| 51 | + ) |
| 46 52 | end |
| @@ -13,5 +13,11 @@ defmodule ExOpenApiUtils.Example.User do | |
| 13 13 | field(:owner_id, :binary_id) |
| 14 14 | end |
| 15 15 | |
| 16 | - open_api_schema(required: [:name], title: "User", description: "The User", tags: ["User"]) |
| 16 | + open_api_schema( |
| 17 | + required: [:name], |
| 18 | + title: "User", |
| 19 | + description: "The User", |
| 20 | + tags: ["User"], |
| 21 | + properties: [:name] |
| 22 | + ) |
| 17 23 | end |
Loading more files…