Packages
TypedStruct plugin for validation & documentation with NimbleOptions
Current section
2 Versions
Jump to
Current section
2 Versions
Compare versions
3
files changed
+5
additions
-5
deletions
| @@ -5,7 +5,7 @@ | |
| 5 5 | [](https://hexdocs.pm/typed_struct_nimble_options/) |
| 6 6 | [](https://github.com/kzemek/typed_struct_nimble_options/blob/master/LICENSE) |
| 7 7 | |
| 8 | - **TypedStructNimbleOptions** is a plugin for [TypedStruct](https://hex.pm/packages/typed_struct) that allows to to easily type, validate & document Elixir structs, all in one place and with little boilerplate. |
| 8 | + **TypedStructNimbleOptions** is a plugin for [TypedStruct](https://hex.pm/packages/typed_struct) that allows to easily type, validate & document Elixir structs, all in one place and with little boilerplate. |
| 9 9 | |
| 10 10 | It leverages [NimbleOptions](https://hex.pm/packages/nimble_options) for validation & documentation. |
| 11 11 | Each `field` of TypedStruct is a key in the generated NimbleOptions schema. |
| @@ -40,8 +40,8 @@ defmodule Person do | |
| 40 40 | typedstruct do |
| 41 41 | plugin TypedStructNimbleOptions |
| 42 42 | |
| 43 | - field :name, String.t(), enforce: true, type: :string, doc: "The name." |
| 44 | - field :age, non_neg_integer(), type: :non_neg_integer, doc: "The age." |
| 43 | + field :name, String.t(), enforce: true, doc: "The name." |
| 44 | + field :age, non_neg_integer(), doc: "The age." |
| 45 45 | field :happy?, boolean(), default: true |
| 46 46 | field :attrs, %{optional(atom()) => String.t()} |
| 47 47 | end |
| @@ -1,7 +1,7 @@ | |
| 1 1 | {<<"links">>, |
| 2 2 | [{<<"GitHub">>,<<"https://github.com/kzemek/typed_struct_nimble_options">>}]}. |
| 3 3 | {<<"name">>,<<"typed_struct_nimble_options">>}. |
| 4 | - {<<"version">>,<<"0.1.0">>}. |
| 4 | + {<<"version">>,<<"0.1.1">>}. |
| 5 5 | {<<"description">>, |
| 6 6 | <<"TypedStruct plugin for validation & documentation with NimbleOptions">>}. |
| 7 7 | {<<"elixir">>,<<"~> 1.17">>}. |
| @@ -4,7 +4,7 @@ defmodule TypedStructNimbleOptions.MixProject do | |
| 4 4 | def project do |
| 5 5 | [ |
| 6 6 | app: :typed_struct_nimble_options, |
| 7 | - version: "0.1.0", |
| 7 | + version: "0.1.1", |
| 8 8 | description: "TypedStruct plugin for validation & documentation with NimbleOptions", |
| 9 9 | package: [ |
| 10 10 | links: %{"GitHub" => "https://github.com/kzemek/typed_struct_nimble_options"}, |