Skip to content

JSon Scheme element definition Query #236

Open

Description

@PeteLong

The following two elements ( system and doc_type ) are example elements defined in my JSon schema that was generated using Jsonix

How can these definitions be updated to specify min and max value effectively if this a mandatory element.

Also for numeric, how can i define the min and max values the element can have eg range of 4 to 10.

Are there examples of how to define constraints for elements.

Thank you for your help

Pete


"system":{
                    "title":"system",
                    "allOf":[
                        {
                            "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
                        }
                    ],
                    "propertyType":"element",
                    "elementName":{
                        "localPart":"system",
                        "namespaceURI":""
                    }
                },

"docType":{
                    "title":"docType",
                    "allOf":[
                        {
                            "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/short"
                        }
                    ],
                    "propertyType":"element",
                    "elementName":{
                        "localPart":"doc_type",
                        "namespaceURI":""
                    }
                },

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions