Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F115745
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
23 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/examples/phoenix_app/config/config.exs b/examples/phoenix_app/config/config.exs
index 4a72716..04b3e57 100644
--- a/examples/phoenix_app/config/config.exs
+++ b/examples/phoenix_app/config/config.exs
@@ -1,13 +1,15 @@
use Mix.Config
config :phoenix_app, PhoenixAppWeb.Endpoint,
url: [host: "localhost"],
render_errors: [view: PhoenixAppWeb.ErrorView, accepts: ~w(json)]
config :phoenix_app, ecto_repos: [PhoenixApp.Repo]
+config :phoenix, :json_library, Jason
+
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
import_config "#{Mix.env}.exs"
diff --git a/examples/phoenix_app/lib/phoenix_app_web/api_spec.ex b/examples/phoenix_app/lib/phoenix_app_web/api_spec.ex
index 265db6b..831ac9f 100644
--- a/examples/phoenix_app/lib/phoenix_app_web/api_spec.ex
+++ b/examples/phoenix_app/lib/phoenix_app_web/api_spec.ex
@@ -1,16 +1,17 @@
defmodule PhoenixAppWeb.ApiSpec do
alias OpenApiSpex.{Info, OpenApi, Paths}
@behaviour OpenApi
@impl OpenApi
def spec do
%OpenApi{
info: %Info{
title: "Phoenix App",
version: "1.0"
},
+ servers: [OpenApiSpex.Server.from_endpoint(PhoenixAppWeb.Endpoint)],
paths: Paths.from_router(PhoenixAppWeb.Router)
}
|> OpenApiSpex.resolve_schema_modules()
end
end
diff --git a/examples/phoenix_app/lib/phoenix_app_web/mix/tasks/spec.ex b/examples/phoenix_app/lib/phoenix_app_web/mix/tasks/spec.ex
index e965543..7d0c757 100644
--- a/examples/phoenix_app/lib/phoenix_app_web/mix/tasks/spec.ex
+++ b/examples/phoenix_app/lib/phoenix_app_web/mix/tasks/spec.ex
@@ -1,7 +1,9 @@
defmodule Mix.Tasks.PhoenixAppWeb.OpenApiSpec do
def run([]) do
+ PhoenixAppWeb.Endpoint.start_link()
+
PhoenixAppWeb.ApiSpec.spec()
|> Jason.encode!(pretty: true, maps: :strict)
|> (&File.write!("openapi3_v1.0.json", &1)).()
end
end
diff --git a/examples/phoenix_app/mix.exs b/examples/phoenix_app/mix.exs
index 45742c5..87c8ec7 100644
--- a/examples/phoenix_app/mix.exs
+++ b/examples/phoenix_app/mix.exs
@@ -1,48 +1,48 @@
defmodule PhoenixApp.Mixfile do
use Mix.Project
def project do
[
app: :phoenix_app,
version: "0.0.1",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {PhoenixApp.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp aliases() do
[test: ["ecto.create --quiet", "ecto.migrate", "test"]]
end
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:open_api_spex, path: "../../"},
{:ecto, "~> 2.2"},
- {:sqlite_ecto2, "~> 2.2"},
- {:phoenix, "~> 1.3"},
- {:plug_cowboy, "~> 1.0"},
+ {:sqlite_ecto2, "~> 2.4"},
+ {:phoenix, "~> 1.4"},
+ {:plug_cowboy, "~> 2.0"},
{:jason, "~> 1.0"}
]
end
end
diff --git a/examples/phoenix_app/mix.lock b/examples/phoenix_app/mix.lock
index feb90e5..436f8ee 100644
--- a/examples/phoenix_app/mix.lock
+++ b/examples/phoenix_app/mix.lock
@@ -1,22 +1,23 @@
%{
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"},
- "cowboy": {:hex, :cowboy, "1.1.2", "61ac29ea970389a88eca5a65601460162d370a70018afe6f949a29dca91f3bb0", [:rebar3], [{:cowlib, "~> 1.0.2", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3.2", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"},
- "cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], [], "hexpm"},
+ "cowboy": {:hex, :cowboy, "2.6.3", "99aa50e94e685557cad82e704457336a453d4abcb77839ad22dbe71f311fcc06", [:rebar3], [{:cowlib, "~> 2.7.3", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"},
+ "cowlib": {:hex, :cowlib, "2.7.3", "a7ffcd0917e6d50b4d5fb28e9e2085a0ceb3c97dea310505f7460ff5ed764ce9", [:rebar3], [], "hexpm"},
"db_connection": {:hex, :db_connection, "1.1.3", "89b30ca1ef0a3b469b1c779579590688561d586694a3ce8792985d4d7e575a61", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
- "decimal": {:hex, :decimal, "1.5.0", "b0433a36d0e2430e3d50291b1c65f53c37d56f83665b43d79963684865beab68", [:mix], [], "hexpm"},
+ "decimal": {:hex, :decimal, "1.8.0", "ca462e0d885f09a1c5a342dbd7c1dcf27ea63548c65a65e67334f4b61803822e", [:mix], [], "hexpm"},
"ecto": {:hex, :ecto, "2.2.9", "031d55df9bb430cb118e6f3026a87408d9ce9638737bda3871e5d727a3594aae", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
- "esqlite": {:hex, :esqlite, "0.2.4", "3a8a352c190afe2d6b828b252a6fbff65b5cc1124647f38b15bdab3bf6fd4b3e", [:rebar3], [], "hexpm"},
+ "esqlite": {:hex, :esqlite, "0.4.0", "8d0b88a774dceaec4fff0a6f63248efe811684591f186b6b21d4390be19bf1db", [:rebar3], [], "hexpm"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
- "mime": {:hex, :mime, "1.3.0", "5e8d45a39e95c650900d03f897fbf99ae04f60ab1daa4a34c7a20a5151b7a5fe", [:mix], [], "hexpm"},
- "phoenix": {:hex, :phoenix, "1.3.4", "aaa1b55e5523083a877bcbe9886d9ee180bf2c8754905323493c2ac325903dc5", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"},
- "phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.1", "6668d787e602981f24f17a5fbb69cc98f8ab085114ebfac6cc36e10a90c8e93c", [:mix], [], "hexpm"},
- "plug": {:hex, :plug, "1.7.1", "8516d565fb84a6a8b2ca722e74e2cd25ca0fc9d64f364ec9dbec09d33eb78ccd", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}], "hexpm"},
- "plug_cowboy": {:hex, :plug_cowboy, "1.0.0", "2e2a7d3409746d335f451218b8bb0858301c3de6d668c3052716c909936eb57a", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
+ "mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"},
+ "phoenix": {:hex, :phoenix, "1.4.9", "746d098e10741c334d88143d3c94cab1756435f94387a63441792e66ec0ee974", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.8.1 or ~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"},
+ "phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.2", "496c303bdf1b2e98a9d26e89af5bba3ab487ba3a3735f74bf1f4064d2a845a3e", [:mix], [], "hexpm"},
+ "plug": {:hex, :plug, "1.8.3", "12d5f9796dc72e8ac9614e94bda5e51c4c028d0d428e9297650d09e15a684478", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm"},
+ "plug_cowboy": {:hex, :plug_cowboy, "2.1.0", "b75768153c3a8a9e8039d4b25bb9b14efbc58e9c4a6e6a270abff1cd30cbe320", [:mix], [{:cowboy, "~> 2.5", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"plug_crypto": {:hex, :plug_crypto, "1.0.0", "18e49317d3fa343f24620ed22795ec29d4a5e602d52d1513ccea0b07d8ea7d4d", [:mix], [], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"},
- "poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], [], "hexpm"},
- "ranch": {:hex, :ranch, "1.3.2", "e4965a144dc9fbe70e5c077c65e73c57165416a901bd02ea899cfd95aa890986", [:rebar3], [], "hexpm"},
+ "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm"},
+ "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm"},
"sbroker": {:hex, :sbroker, "1.0.0", "28ff1b5e58887c5098539f236307b36fe1d3edaa2acff9d6a3d17c2dcafebbd0", [:rebar3], [], "hexpm"},
- "sqlite_ecto2": {:hex, :sqlite_ecto2, "2.3.1", "fe58926854c3962c4c8710bd1070dd4ba3717ba77250387794cb7a65f77006aa", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "2.2.9", [hex: :ecto, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.13", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: false]}, {:sqlitex, "~> 1.4", [hex: :sqlitex, repo: "hexpm", optional: false]}], "hexpm"},
- "sqlitex": {:hex, :sqlitex, "1.4.3", "a50f12d6aeb25f4ebb128453386c09bbba8f5abd3c7713dc5eaa92f359926ac5", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:esqlite, "~> 0.2.4", [hex: :esqlite, repo: "hexpm", optional: false]}], "hexpm"},
+ "sqlite_ecto2": {:hex, :sqlite_ecto2, "2.4.0", "6693c112a899d9fd401c6005788428ea52bde382b96a040fe474bde37c244167", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "2.2.9", [hex: :ecto, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.13", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: false]}, {:sqlitex, "~> 1.6", [hex: :sqlitex, repo: "hexpm", optional: false]}], "hexpm"},
+ "sqlitex": {:hex, :sqlitex, "1.7.0", "bf8a90f056c46e6e27c33722cb632b302b83847a88ac7545b3db940edfdab745", [:mix], [{:decimal, "~> 1.7", [hex: :decimal, repo: "hexpm", optional: false]}, {:esqlite, "~> 0.4", [hex: :esqlite, repo: "hexpm", optional: false]}], "hexpm"},
+ "telemetry": {:hex, :telemetry, "0.4.0", "8339bee3fa8b91cb84d14c2935f8ecf399ccd87301ad6da6b71c09553834b2ab", [:rebar3], [], "hexpm"},
}
diff --git a/examples/phoenix_app/openapi3_v1.0.json b/examples/phoenix_app/openapi3_v1.0.json
index c651942..27b2254 100644
--- a/examples/phoenix_app/openapi3_v1.0.json
+++ b/examples/phoenix_app/openapi3_v1.0.json
@@ -1,231 +1,250 @@
{
- "tags": [],
- "servers": [],
- "security": [],
+ "components": {
+ "schemas": {
+ "User": {
+ "description": "A user of the app",
+ "example": {
+ "email": "joe@gmail.com",
+ "id": 123,
+ "inserted_at": "2017-09-12T12:34:55Z",
+ "name": "Joe User",
+ "updated_at": "2017-09-13T10:11:12Z"
+ },
+ "properties": {
+ "birthday": {
+ "description": "Birth date",
+ "format": "date",
+ "type": "string"
+ },
+ "email": {
+ "description": "Email address",
+ "format": "email",
+ "type": "string"
+ },
+ "id": {
+ "description": "User ID",
+ "type": "integer"
+ },
+ "inserted_at": {
+ "description": "Creation timestamp",
+ "format": "date-time",
+ "type": "string"
+ },
+ "name": {
+ "description": "User name",
+ "pattern": "[a-zA-Z][a-zA-Z0-9_]+",
+ "type": "string"
+ },
+ "updated_at": {
+ "description": "Update timestamp",
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "email"
+ ],
+ "title": "User",
+ "type": "object",
+ "x-struct": "Elixir.PhoenixAppWeb.Schemas.User"
+ },
+ "UserRequest": {
+ "description": "POST body for creating a user",
+ "example": {
+ "user": {
+ "email": "joe@gmail.com",
+ "name": "Joe User"
+ }
+ },
+ "properties": {
+ "user": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/User"
+ }
+ ]
+ }
+ },
+ "required": [
+ "user"
+ ],
+ "title": "UserRequest",
+ "type": "object",
+ "x-struct": "Elixir.PhoenixAppWeb.Schemas.UserRequest"
+ },
+ "UserResponse": {
+ "description": "Response schema for single user",
+ "example": {
+ "data": {
+ "email": "joe@gmail.com",
+ "id": 123,
+ "inserted_at": "2017-09-12T12:34:55Z",
+ "name": "Joe User",
+ "updated_at": "2017-09-13T10:11:12Z"
+ }
+ },
+ "properties": {
+ "data": {
+ "$ref": "#/components/schemas/User"
+ }
+ },
+ "title": "UserResponse",
+ "type": "object",
+ "x-struct": "Elixir.PhoenixAppWeb.Schemas.UserResponse"
+ },
+ "UsersResponse": {
+ "description": "Response schema for multiple users",
+ "example": {
+ "data": [
+ {
+ "email": "joe@gmail.com",
+ "id": 123,
+ "name": "Joe User"
+ },
+ {
+ "email": "jay@yahoo.com",
+ "id": 456,
+ "name": "Jay Consumer"
+ }
+ ]
+ },
+ "properties": {
+ "data": {
+ "description": "The users details",
+ "items": {
+ "$ref": "#/components/schemas/User"
+ },
+ "type": "array"
+ }
+ },
+ "title": "UsersResponse",
+ "type": "object",
+ "x-struct": "Elixir.PhoenixAppWeb.Schemas.UsersResponse"
+ }
+ }
+ },
+ "info": {
+ "title": "Phoenix App",
+ "version": "1.0"
+ },
+ "openapi": "3.0.0",
"paths": {
- "/api/users/{id}": {
+ "/api/users": {
"get": {
- "tags": [
- "users"
- ],
- "summary": "Show user",
+ "callbacks": {},
+ "deprecated": false,
+ "description": "List all useres",
+ "operationId": "UserController.index",
+ "parameters": [],
"responses": {
"200": {
- "description": "User",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UserResponse"
+ "$ref": "#/components/schemas/UsersResponse"
}
}
- }
+ },
+ "description": "User List Response"
}
},
+ "summary": "List users",
+ "tags": [
+ "users"
+ ]
+ }
+ },
+ "/api/users/{group_id}": {
+ "post": {
+ "callbacks": {},
+ "deprecated": false,
+ "description": "Create a user",
+ "operationId": "UserController.create",
"parameters": [
{
+ "description": "Group ID",
+ "example": 1,
+ "in": "path",
+ "name": "group_id",
+ "required": true,
"schema": {
"type": "integer"
- },
- "required": true,
- "name": "id",
- "in": "path",
- "example": 123,
- "description": "User ID"
+ }
}
],
- "operationId": "UserController.show",
- "description": "Show a user by ID"
- }
- },
- "/api/users": {
- "post": {
- "tags": [
- "users"
- ],
- "summary": "Create user",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UserRequest"
+ }
+ }
+ },
+ "description": "The user attributes",
+ "required": true
+ },
"responses": {
"201": {
- "description": "User",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserResponse"
}
}
- }
- }
- },
- "requestBody": {
- "required": true,
- "description": "The user attributes",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UserRequest"
- }
- }
+ },
+ "description": "User"
}
},
+ "summary": "Create user",
+ "tags": [
+ "users"
+ ]
+ }
+ },
+ "/api/users/{id}": {
+ "get": {
+ "callbacks": {},
+ "deprecated": false,
+ "description": "Show a user by ID",
+ "operationId": "UserController.show",
"parameters": [
{
+ "description": "User ID",
+ "example": 123,
+ "in": "path",
+ "name": "id",
+ "required": true,
"schema": {
"type": "integer"
- },
- "required": true,
- "name": "group_id",
- "in": "path",
- "example": 1,
- "description": "Group ID"
+ }
}
],
- "operationId": "UserController.create",
- "description": "Create a user"
- },
- "get": {
- "tags": [
- "users"
- ],
- "summary": "List users",
"responses": {
"200": {
- "description": "User List Response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UsersResponse"
+ "$ref": "#/components/schemas/UserResponse"
}
}
- }
+ },
+ "description": "User"
}
},
- "operationId": "UserController.index",
- "description": "List all useres"
+ "summary": "Show user",
+ "tags": [
+ "users"
+ ]
}
}
},
- "openapi": "3.0.0",
- "info": {
- "version": "1.0",
- "title": "Phoenix App"
- },
- "components": {
- "schemas": {
- "UsersResponse": {
- "x-struct": "Elixir.PhoenixAppWeb.Schemas.UsersResponse",
- "type": "object",
- "title": "UsersResponse",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/User"
- },
- "description": "The users details"
- }
- },
- "example": {
- "data": [
- {
- "name": "Joe User",
- "id": 123,
- "email": "joe@gmail.com"
- },
- {
- "name": "Jay Consumer",
- "id": 456,
- "email": "jay@yahoo.com"
- }
- ]
- },
- "description": "Response schema for multiple users"
- },
- "UserResponse": {
- "x-struct": "Elixir.PhoenixAppWeb.Schemas.UserResponse",
- "type": "object",
- "title": "UserResponse",
- "properties": {
- "data": {
- "$ref": "#/components/schemas/User"
- }
- },
- "example": {
- "data": {
- "updated_at": "2017-09-13T10:11:12Z",
- "name": "Joe User",
- "inserted_at": "2017-09-12T12:34:55Z",
- "id": 123,
- "email": "joe@gmail.com"
- }
- },
- "description": "Response schema for single user"
- },
- "UserRequest": {
- "x-struct": "Elixir.PhoenixAppWeb.Schemas.UserRequest",
- "type": "object",
- "title": "UserRequest",
- "required": [
- "user"
- ],
- "properties": {
- "user": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/User"
- }
- ]
- }
- },
- "example": {
- "user": {
- "name": "Joe User",
- "email": "joe@gmail.com"
- }
- },
- "description": "POST body for creating a user"
- },
- "User": {
- "x-struct": "Elixir.PhoenixAppWeb.Schemas.User",
- "type": "object",
- "title": "User",
- "required": [
- "name",
- "email"
- ],
- "properties": {
- "updated_at": {
- "type": "string",
- "format": "date-time",
- "description": "Update timestamp"
- },
- "name": {
- "type": "string",
- "pattern": "[a-zA-Z][a-zA-Z0-9_]+",
- "description": "User name"
- },
- "inserted_at": {
- "type": "string",
- "format": "date-time",
- "description": "Creation timestamp"
- },
- "id": {
- "type": "integer",
- "description": "User ID"
- },
- "email": {
- "type": "string",
- "format": "email",
- "description": "Email address"
- }
- },
- "example": {
- "updated_at": "2017-09-13T10:11:12Z",
- "name": "Joe User",
- "inserted_at": "2017-09-12T12:34:55Z",
- "id": 123,
- "email": "joe@gmail.com"
- },
- "description": "A user of the app"
- }
+ "security": [],
+ "servers": [
+ {
+ "url": "http://localhost:4000",
+ "variables": {}
}
- }
+ ],
+ "tags": []
}
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Nov 28, 8:39 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41096
Default Alt Text
(23 KB)
Attached To
Mode
R22 open_api_spex
Attached
Detach File
Event Timeline
Log In to Comment