Skip to content

Commit

Permalink
Fix JSON schema for getModelInstance (#10072)
Browse files Browse the repository at this point in the history
- Move the schema for a replaceable prefix to a separate definition and
  use it for both classes and components, to reflect what is actually
  dumped by `getModelInstance`.
  • Loading branch information
perost committed Jan 19, 2023
1 parent a9f36c0 commit dec0a6b
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions doc/instanceAPI/getModelInstance.schema.json
Expand Up @@ -33,35 +33,7 @@
"type": "boolean"
},
"replaceable": {
"oneOf": [
{
"description": "A replaceable prefix without a constrainedby clause",
"type": "boolean"
},
{
"description": "A replaceable prefix with a constrainedby clause",
"type": "object",
"properties": {
"constrainedby": {
"description": "The name of the constraining class",
"type": "string"
},
"modifiers": {
"description": "The modifiers on the constrainedby clause",
"type": "#/definitions/scodeModifier"
},
"comment": {
"description": "The comment on the constrainedby clause",
"$ref": "#/definitions/comment"
},
"annotation": {
"description": "The annotation on the constrainedby clause",
"$ref": "#/definitions/annotation"
}
},
"required": ["constrainedby"]
}
]
"$ref": "#/definitions/replaceablePrefix"
},
"redeclare": {
"type": "boolean"
Expand Down Expand Up @@ -329,7 +301,7 @@
"type": "boolean"
},
"replaceable": {
"type": "boolean"
"$ref": "#/definitions/replaceablePrefix"
},
"redeclare": {
"type": "boolean"
Expand Down Expand Up @@ -361,6 +333,37 @@
}
]
},
"replaceablePrefix": {
"oneOf": [
{
"description": "A replaceable prefix without a constrainedby clause",
"type": "boolean"
},
{
"description": "A replaceable prefix with a constrainedby clause",
"type": "object",
"properties": {
"constrainedby": {
"description": "The name of the constraining class",
"type": "string"
},
"modifiers": {
"description": "The modifiers on the constrainedby clause",
"type": "#/definitions/scodeModifier"
},
"comment": {
"description": "The comment on the constrainedby clause",
"$ref": "#/definitions/comment"
},
"annotation": {
"description": "The annotation on the constrainedby clause",
"$ref": "#/definitions/annotation"
}
},
"required": ["constrainedby"]
}
]
},
"binding": {
"description": "A binding expression",
"type": "object",
Expand Down

0 comments on commit dec0a6b

Please sign in to comment.