You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am unable to TypeGenerator on json files that reference local json files and therefore I need to put my json files on the web with a public facing http endpoint just to generate types that reference other custom element types.
For example I would like to be able to use 2 json files in a folder and be able to compile them. Refer to the following types I would like to see working.
So this Vector2 file compiles fine.
{
"$id": "Vector2.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Vector2",
"x-namespace": "Elements.Geometry",
"x-struct": true,
"description": "A 2D vector.",
"type": [
"object",
"null"
],
"required": [
"X",
"Y"
],
"properties": {
"X": {
"type": "number",
"description": "The X component of the vector."
},
"Y": {
"type": "number",
"description": "The Y component of the vector."
}
},
"additionalProperties": false
}
However I get the following error when I try and generate cs from this I get an issue.
{
"$id": "BoundingRectangle.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BoundingRectangle",
"x-namespace": "Elements.Geometry",
"type": [ "object", "null" ],
"discriminator": "discriminator",
"description": "The base segment class.",
"required": [ "discriminator" ],
"properties": {
"Min": {
"description": "The min point.",
"$ref": "#Vector2"
},
"Max": {
"description": "The max point.",
"$ref": "#Vector2"
}
},
"additionalProperties": false
}
The error is as follows: "Could not resolve the JSON path 'Vector2.json' because no document path is available.
Describe the solution you'd like
I would like to be to reference local files or even use json arrays similar to the schema where you can call a single json file and use the prefix # to reference the object, you can find more about this here. https://redoc.ly/docs/resources/ref-guide/
Describe alternatives you've considered
I can just put this on http end points I make publicly to get around this for the moment.
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I am unable to TypeGenerator on json files that reference local json files and therefore I need to put my json files on the web with a public facing http endpoint just to generate types that reference other custom element types.
For example I would like to be able to use 2 json files in a folder and be able to compile them. Refer to the following types I would like to see working.
So this Vector2 file compiles fine.
{
"$id": "Vector2.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Vector2",
"x-namespace": "Elements.Geometry",
"x-struct": true,
"description": "A 2D vector.",
"type": [
"object",
"null"
],
"required": [
"X",
"Y"
],
"properties": {
"X": {
"type": "number",
"description": "The X component of the vector."
},
"Y": {
"type": "number",
"description": "The Y component of the vector."
}
},
"additionalProperties": false
}
However I get the following error when I try and generate cs from this I get an issue.
{
"$id": "BoundingRectangle.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BoundingRectangle",
"x-namespace": "Elements.Geometry",
"type": [ "object", "null" ],
"discriminator": "discriminator",
"description": "The base segment class.",
"required": [ "discriminator" ],
"properties": {
"Min": {
"description": "The min point.",
"$ref": "#Vector2"
},
"Max": {
"description": "The max point.",
"$ref": "#Vector2"
}
},
"additionalProperties": false
}
The error is as follows: "Could not resolve the JSON path 'Vector2.json' because no document path is available.
Describe the solution you'd like
I would like to be to reference local files or even use json arrays similar to the schema where you can call a single json file and use the prefix # to reference the object, you can find more about this here.
https://redoc.ly/docs/resources/ref-guide/
Describe alternatives you've considered
I can just put this on http end points I make publicly to get around this for the moment.
Additional context
The text was updated successfully, but these errors were encountered: