File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
compiler/src/main/java/org/hisrc/jsonix/compilation/jsonschema Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,25 @@ private void addElementInfos(final JsonSchemaBuilder schema) {
6565
6666 final JsonSchemaBuilder elementInfoSchema = new JsonSchemaBuilder ();
6767 elementInfoSchema .addType (JsonSchemaConstants .OBJECT_TYPE );
68- elementInfoSchema
68+ final JsonSchemaBuilder qNameRef = new JsonSchemaBuilder ()
69+ .addRef (XmlSchemaJsonSchemaConstants .QNAME_TYPE_INFO_SCHEMA_REF );
70+ final JsonSchemaBuilder nameConstant = new JsonSchemaBuilder ();
71+ nameConstant .addType (JsonSchemaConstants .OBJECT_TYPE );
72+ nameConstant
6973 .addProperty (
70- JsonixConstants .NAME_PROPERTY_NAME ,
71- new JsonSchemaBuilder ()
72- .addRef (XmlSchemaJsonSchemaConstants .QNAME_TYPE_INFO_SCHEMA_REF ));
74+ JsonixJsonSchemaConstants .LOCAL_PART_PROPERTY_NAME ,
75+ new JsonSchemaBuilder ().addEnum (elementName
76+ .getLocalPart ()));
77+ nameConstant .addProperty (
78+ JsonixJsonSchemaConstants .NAMESPACE_URI_PROPERTY_NAME ,
79+ new JsonSchemaBuilder ().addEnum (elementName
80+ .getNamespaceURI ()));
81+
82+ elementInfoSchema .addProperty (
83+ JsonixConstants .NAME_PROPERTY_NAME ,
84+ new JsonSchemaBuilder ().addAllOf (qNameRef ).addAllOf (
85+ nameConstant ));
86+
7387 elementInfoSchema .addProperty (JsonixConstants .VALUE_PROPERTY_NAME ,
7488 createTypeInfoSchemaRef (typeInfo ));
7589
You can’t perform that action at this time.
0 commit comments