Skip to content

Commit 555fd70

Browse files
committed
Update README; bump version.
1 parent 6541dff commit 555fd70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ JSON::SchemaGenerate has the following features or assumptions for generating "b
4848
* **Defaults**: Can generate default values.
4949
* **Descriptions**: Can generate a description indicating where the schema came from.
5050
* **Features/Assumptions**:
51-
* **Detecting optional properties:** if you have an array of hashes, then will detect which hash keys exist in every instance of the hash and which ones only exist in some, and use this data to decide if the key is required or optional in the schema.
51+
* **Detecting optional properties:** if you are using arrays (even arrays with complex nested types), the generator will use all available data to figure detect if a field is optional.
5252
* **Assume required:** in all other cases, I assume everything I find in the sample is required. I believe it is better to generate a schema that is too strict than too lenient. It is easy to review and fix false negatives, by updating the schema to mark those items as optional. A false positive will go unnoticed and will not point you towards a solution.
5353
* **Detect types:** I detect objects, arrays, strings, integers, numbers and booleans.
5454

lib/json/schema_generator/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module JSON
22
class SchemaGenerator
3-
VERSION = "0.0.5"
3+
VERSION = "0.0.6"
44
end
55
end

0 commit comments

Comments
 (0)