Test case
1 generated file · +14 −0test/inputs/schema/all-of-additional-properties-false.schema
Aschema-crystaldefault / TopLevel.cr+14 −0
| @@ -0,0 +1,14 @@ | ||
| 1 | +require "json" | |
| 2 | + | |
| 3 | +class TopLevel | |
| 4 | + include JSON::Serializable | |
| 5 | + | |
| 6 | + property amount : Float64 | |
| 7 | + | |
| 8 | + property frequency : String | |
| 9 | + | |
| 10 | + property description : String? | |
| 11 | + | |
| 12 | + @[JSON::Field(key: "type")] | |
| 13 | + property top_level_type : String | |
| 14 | +end |
Test case
1 generated file · +15 −0test/inputs/schema/const-non-string.schema
Aschema-crystaldefault / TopLevel.cr+15 −0
| @@ -0,0 +1,15 @@ | ||
| 1 | +require "json" | |
| 2 | + | |
| 3 | +class TopLevel | |
| 4 | + include JSON::Serializable | |
| 5 | + | |
| 6 | + property amount : Int64 | |
| 7 | + | |
| 8 | + property enabled : Bool | |
| 9 | + | |
| 10 | + property kind : String | |
| 11 | + | |
| 12 | + property ratio : Float64 | |
| 13 | + | |
| 14 | + property version : Float64 | |
| 15 | +end |
Test case
1 generated file · +9 −0test/inputs/schema/enum-large.schema
Aschema-crystaldefault / TopLevel.cr+9 −0
| @@ -0,0 +1,9 @@ | ||
| 1 | +require "json" | |
| 2 | + | |
| 3 | +class TopLevel | |
| 4 | + include JSON::Serializable | |
| 5 | + | |
| 6 | + property callsign : String | |
| 7 | + | |
| 8 | + property priority : String | |
| 9 | +end |
Test case
1 generated file · +19 −0test/inputs/schema/enum.schema
Aschema-crystaldefault / TopLevel.cr+19 −0
| @@ -0,0 +1,19 @@ | ||
| 1 | +require "json" | |
| 2 | + | |
| 3 | +class TopLevel | |
| 4 | + include JSON::Serializable | |
| 5 | + | |
| 6 | + property arr : Array(Arr)? | |
| 7 | + | |
| 8 | + @[JSON::Field(key: "for")] | |
| 9 | + property top_level_for : String? | |
| 10 | + | |
| 11 | + property gve : String | |
| 12 | + | |
| 13 | + property lvc : String? | |
| 14 | + | |
| 15 | + @[JSON::Field(key: "otherArr")] | |
| 16 | + property other_arr : Array(String)? | |
| 17 | +end | |
| 18 | + | |
| 19 | +alias Arr = Int64 | String |
Test case
1 generated file · +7 −0test/inputs/schema/haskell-enum-forbidden.schema
Aschema-crystaldefault / TopLevel.cr+7 −0
| @@ -0,0 +1,7 @@ | ||
| 1 | +require "json" | |
| 2 | + | |
| 3 | +class TopLevel | |
| 4 | + include JSON::Serializable | |
| 5 | + | |
| 6 | + property health : String | |
| 7 | +end |
Test case
1 generated file · +9 −0test/inputs/schema/nullable-optional-one-of.schema
Aschema-crystaldefault / TopLevel.cr+9 −0
| @@ -0,0 +1,9 @@ | ||
| 1 | +require "json" | |
| 2 | + | |
| 3 | +class TopLevel | |
| 4 | + include JSON::Serializable | |
| 5 | + | |
| 6 | + property b : String? | |
| 7 | + | |
| 8 | + property kind : String | |
| 9 | +end |
No generated files match these filters.