diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/README.md b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleArrayDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleArrayDefinition.st new file mode 100644 index 0000000..48c6ccf --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleArrayDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleArrayDefinition + | definition schema string | + string := '{"type":"array"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaArray. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleBooleanDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleBooleanDefinition.st new file mode 100644 index 0000000..76d8034 --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleBooleanDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleBooleanDefinition + | definition schema string | + string := '{"type":"boolean"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaBoolean. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleIntegerDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleIntegerDefinition.st new file mode 100644 index 0000000..3fe4699 --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleIntegerDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleIntegerDefinition + | definition schema string | + string := '{"type":"integer"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaInteger. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleNullDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleNullDefinition.st new file mode 100644 index 0000000..015d3c8 --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleNullDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleNullDefinition + | definition schema string | + string := '{"type":"null"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaNull. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleNumberDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleNumberDefinition.st new file mode 100644 index 0000000..6ff7824 --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleNumberDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleNumberDefinition + | definition schema string | + string := '{"type":"number"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaNumber. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleObjectDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleObjectDefinition.st new file mode 100644 index 0000000..3f8d7a2 --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleObjectDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleObjectDefinition + | definition schema string | + string := '{"type":"object"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaObject. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleStringDefinition.st b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleStringDefinition.st new file mode 100644 index 0000000..0e6e39d --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/instance/testSimpleStringDefinition.st @@ -0,0 +1,8 @@ +tests +testSimpleStringDefinition + | definition schema string | + string := '{"type":"string"}'. + definition := JSONSchemaDefinition fromString: string. + schema := definition schema. + self assert: schema class equals: JSONSchemaString. + self assert: schema jsonString equals: string \ No newline at end of file diff --git a/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/properties.json b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/properties.json new file mode 100644 index 0000000..beb77a2 --- /dev/null +++ b/source/JSONSchema-Core-Tests.package/JSONSchemaDefinitionTests.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "JSONSchema-Core-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "JSONSchemaDefinitionTests", + "type" : "normal" +} \ No newline at end of file diff --git a/source/JSONSchema-Core.package/JSONSchema.class/instance/jsonString.st b/source/JSONSchema-Core.package/JSONSchema.class/instance/jsonString.st new file mode 100644 index 0000000..d9579dd --- /dev/null +++ b/source/JSONSchema-Core.package/JSONSchema.class/instance/jsonString.st @@ -0,0 +1,3 @@ +conversion +jsonString + ^ NeoJSONWriter toString: self \ No newline at end of file diff --git a/source/JSONSchema-Core.package/JSONSchemaNull.class/README.md b/source/JSONSchema-Core.package/JSONSchemaNull.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/source/JSONSchema-Core.package/JSONSchemaNull.class/class/typeName.st b/source/JSONSchema-Core.package/JSONSchemaNull.class/class/typeName.st new file mode 100644 index 0000000..435dce7 --- /dev/null +++ b/source/JSONSchema-Core.package/JSONSchemaNull.class/class/typeName.st @@ -0,0 +1,3 @@ +instance creation +typeName + ^ 'null' \ No newline at end of file diff --git a/source/JSONSchema-Core.package/JSONSchemaNull.class/properties.json b/source/JSONSchema-Core.package/JSONSchemaNull.class/properties.json new file mode 100644 index 0000000..b03f501 --- /dev/null +++ b/source/JSONSchema-Core.package/JSONSchemaNull.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "JSONPrimitiveSchema", + "category" : "JSONSchema-Core-Model", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "JSONSchemaNull", + "type" : "normal" +} \ No newline at end of file diff --git a/source/JSONSchema-Core.package/JSONSchemaObject.class/instance/properties.st b/source/JSONSchema-Core.package/JSONSchemaObject.class/instance/properties.st index d0d3a11..820e779 100644 --- a/source/JSONSchema-Core.package/JSONSchemaObject.class/instance/properties.st +++ b/source/JSONSchema-Core.package/JSONSchemaObject.class/instance/properties.st @@ -1,4 +1,4 @@ accessing properties - ^ properties ifNil: [ - properties := Dictionary new ] \ No newline at end of file + ^ properties "ifNil: [ + properties := Dictionary new ]" \ No newline at end of file