What to do for oneOf in json-chema-to-types-async-converter?
#31
FreePhoenix888
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
JSONSchema
{ "description": "Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository", "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "node_id": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "color": { "type": [ "string", "null" ] }, "default": { "type": "boolean" } } } ] }, "examples": [ "bug", "registration" ] }Description
labelsproperty can be either object or string. As I know there is no way to giveobject|stringtype for link. If we "give" itObjectvalue - any json will be able to be stored there (string, number, array, object, and so on...). What do you think about it? What would you do in this situation?If there would be just object I would "give" it
Objectvalue and created links for every field.My idea:
Still create link for every object field. If there will be object - they are will be used, if there will be string - they are not will be used. Looks like no problem?
Beta Was this translation helpful? Give feedback.
All reactions