Closed agougousis closed 8 years ago
@agougousis Can you try the following?
nodes (array[object], fixed)
Ok! Though I haven't found yet where this "fixed" world came from, now the schema is complete. However, it seems that the produced schema is not right. The schema produced is:
and the correct schema should be:
Am I wrong?
Can you try this?
+ nodes (array, fixed)
+ (object)
+ id: 4 (number)
Yeap! A lot better! I didn't think that "anonymous" objects can be defined!
I am not sure, but I think that the brackets marked in the following screenshot should not be there. What do you think?
@agougousis The brackets are correct as items is an array of possible types
I don't remember very well the rules, but in http://jsonschema.net/ (a quick and dirty solution that I use from time to time) when i give the json data as input it gives me the schema without these brackets.
@agougousis use a fixed-type
for this:
+ nodes (array, fixed-type)
+ (object)
+ id: 4 (number)
+1 for the fixed-type
fixed - instance of this type structure and values are fixed. This attribute propagates to Nested Member Types.
fixed-type - instance of this type structure is fixed, value is not. This attribute does not propagate to Nested Member Types.
https://apiblueprint.org/documentation/mson/specification.html#353-type-attribute
The following part of my text file:
Response 200 (application/json)
Chromista
(string) - The scientific nameKingdom
(string) - The taxonomic rank of the scientific namenoworms, 1603
(string) - Authorship information about the scientific nameProduces this HTML:
The part of schema inside the ""nodes" is missing! Why? I have also tried to use data structures but the schema remains incomplete.