Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newlines around lists #91

Merged
merged 4 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/docs/abstract.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This is an abstract schema. It has `definitions`, but does not declare any prope
A unique identifier given to every addressable thing.

`bar`

* is optional
* type: `string`
* defined in this schema
Expand All @@ -42,11 +43,13 @@ A unique identifier given to every addressable thing.




## foo

A unique identifier given to every addressable thing.

`foo`

* is optional
* type: `string`
* defined in this schema
Expand All @@ -61,11 +64,13 @@ A unique identifier given to every addressable thing.




## nonfoo

This is not foo.

`nonfoo`

* is optional
* type: `const`
* defined in this schema
Expand Down
21 changes: 17 additions & 4 deletions examples/docs/arrays.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const
This is an array

`boollist`

* is optional
* type: `boolean[]`
* at least `1` items in the array
Expand All @@ -58,6 +59,7 @@ All items must be of the type:
This is an array of coordinates in three-dimensional space.

`coordinatelist`

* is optional
* type: `number[][]` (nested array)
* no more than `10` items in the array
Expand All @@ -72,6 +74,7 @@ Nested array type: `number[]`

All items must be of the type:
`number`

* minimum value: `0`
* maximum value: `10`

Expand All @@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values
This is an array

`intlist`

* is optional
* type: `integer[]`
* between `1` and `10` items in the array
Expand All @@ -113,14 +117,15 @@ All items must be of the type:




## list

This is an array

`list`

* is optional
* type: `string[]`

* defined in this schema

### list Type
Expand All @@ -139,14 +144,15 @@ All items must be of the type:




## listlist

This is an array of arrays

`listlist`

* is optional
* type: `array[]` (nested array)

* defined in this schema

### listlist Type
Expand All @@ -168,6 +174,7 @@ Nested array type: `array`
This is an array

`numlist`

* is optional
* type: `number[]`
* no more than `10` items in the array
Expand All @@ -180,6 +187,7 @@ Array type: `number[]`

All items must be of the type:
`number`

* minimum value: `10`


Expand All @@ -194,9 +202,9 @@ All items must be of the type:
An array of simple objects

`objectlist`

* is optional
* type: `object[]`

* defined in this schema

### objectlist Type
Expand All @@ -220,6 +228,7 @@ All items must be of the type:
The a property

`a`

* is **required**
* type: `string`

Expand All @@ -235,11 +244,13 @@ The a property




#### b

The b property

`b`

* is optional
* type: `integer`

Expand All @@ -261,14 +272,15 @@ The b property




## stringlistlist

This is an array of arrays of strings

`stringlistlist`

* is optional
* type: `string[][]` (nested array)

* defined in this schema

### stringlistlist Type
Expand All @@ -290,3 +302,4 @@ All items must be of the type:




20 changes: 19 additions & 1 deletion examples/docs/complex.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas.
Number in a range

`and`

* is optional
* type: complex
* defined in this schema
Expand All @@ -54,13 +55,15 @@ Number in a range


`number`

* maximum value: `10`


#### Requirement 2


`number`

* minimum value: `0`


Expand All @@ -74,6 +77,7 @@ Number in a range
String or number…

`or`

* is optional
* type: complex
* defined in this schema
Expand All @@ -91,10 +95,12 @@ String or number…




#### Option 2


`number`

* minimum value: `0`


Expand All @@ -107,6 +113,7 @@ String or number…


`refabstract`

* is **required**
* type: `object`
* defined in this schema
Expand All @@ -129,6 +136,7 @@ String or number…
A unique identifier given to every addressable thing.

`foo`

* is optional
* type: `string`

Expand All @@ -144,11 +152,13 @@ A unique identifier given to every addressable thing.




#### nonfoo

This is not foo.

`nonfoo`

* is optional
* type: `const`

Expand All @@ -171,9 +181,9 @@ false


`reflist`

* is optional
* type: Simple

* defined in this schema

### reflist Type
Expand All @@ -195,6 +205,7 @@ All items must be of the type:


`refnamed`

* is optional
* type: Simple
* defined in this schema
Expand All @@ -213,6 +224,7 @@ All items must be of the type:
Exclusive choice.

`xor`

* is optional
* type: complex
* defined in this schema
Expand All @@ -227,13 +239,15 @@ Exclusive choice.


`number`

* maximum value: `0`


#### Condition 2


`number`

* minimum value: `10`


Expand All @@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*`


`int.*`

* is a property pattern
* type: `integer`
* defined in this schema
Expand All @@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*`




## Pattern: `str.*`
Applies to all properties that match the regular expression `str.*`


`str.*`

* is a property pattern
* type: `string`
* defined in this schema
Expand All @@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*`




1 change: 1 addition & 0 deletions examples/docs/constants.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This is an example schema with examples for properties with constant values
A simple string, without strong constraints.

`hello`

* is **required**
* type: `const`
* defined in this schema
Expand Down
4 changes: 4 additions & 0 deletions examples/docs/custom.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc
A unique identifier given to every addressable thing.

`bar`

* is optional
* type: `string`
* defined in this schema
Expand All @@ -42,11 +43,13 @@ A unique identifier given to every addressable thing.




## foo

A unique identifier given to every addressable thing.

`foo`

* is optional
* type: `string`
* defined in this schema
Expand All @@ -60,3 +63,4 @@ A unique identifier given to every addressable thing.




Loading