forked from enola-dev/enola
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (core): Generate JSON Schema from Enola Core Meta Proto during b…
…uild This commit is part of the overall work I've done over the past few week-ends, see enola-dev#451 for history; it is only commited separately here for clearer future git log.
- Loading branch information
Showing
15 changed files
with
3,173 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$ref": "#/definitions/Connector", | ||
"definitions": { | ||
"Connector": { | ||
"properties": { | ||
"error": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "Always fails with this error message (for testing, only). TODO Remove this again? This was really useful in earlier testing, only." | ||
}, | ||
"java_class": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "Java class name for in-process connector on the Java classpath." | ||
}, | ||
"fs": { | ||
"$ref": "#/definitions/dev.enola.core.meta.FileSystemRepository", | ||
"additionalProperties": false, | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{} | ||
], | ||
"title": "TODO java_guice lookup?", | ||
"description": "TODO java_guice lookup?" | ||
}, | ||
"grpc": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "Invokes remote connector via gRPC. The \"connection string\" here is a target endpoint in hostname:port format. (It's NOT an URI, so there is no scheme:// nor any /path/ or #fragment.)" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "object" | ||
} | ||
], | ||
"title": "Connector" | ||
}, | ||
"dev.enola.core.meta.FileSystemRepository": { | ||
"properties": { | ||
"path": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"format": { | ||
"enum": [ | ||
"FORMAT_UNSPECIFIED", | ||
0, | ||
"FORMAT_TEXTPROTO", | ||
1, | ||
"FORMAT_YAML", | ||
2, | ||
"FORMAT_JSON", | ||
3 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"title": "Format" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "object" | ||
} | ||
], | ||
"title": "File System Repository" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$ref": "#/definitions/Data", | ||
"definitions": { | ||
"Data": { | ||
"properties": { | ||
"label": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "Human readable label, may be shown on a UI." | ||
}, | ||
"description": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "Short 1-2 sentences of description, may be shown on a UI e.g. as tooltip." | ||
}, | ||
"tags": { | ||
"additionalProperties": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "object" | ||
} | ||
], | ||
"description": "Tags." | ||
}, | ||
"type_url": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"description": "The fully qualified name of the (root) Protocol Buffer Message; see https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"type": "object" | ||
} | ||
], | ||
"title": "Data" | ||
} | ||
} | ||
} |
Oops, something went wrong.