-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial version of new Libdoc JSON schema. #4281
Modeled using pydantic.
- Loading branch information
1 parent
30b0b49
commit 641e08b
Showing
2 changed files
with
477 additions
and
0 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,348 @@ | ||
{ | ||
"title": "Libdoc", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "Name", | ||
"type": "string" | ||
}, | ||
"doc": { | ||
"title": "Doc", | ||
"type": "string" | ||
}, | ||
"version": { | ||
"title": "Version", | ||
"type": "string" | ||
}, | ||
"generated": { | ||
"title": "Generated", | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"type": { | ||
"$ref": "#/definitions/DocumentationType" | ||
}, | ||
"scope": { | ||
"$ref": "#/definitions/LibraryScope" | ||
}, | ||
"docFormat": { | ||
"$ref": "#/definitions/DocumentationFormat" | ||
}, | ||
"source": { | ||
"title": "Source", | ||
"type": "string", | ||
"format": "path" | ||
}, | ||
"lineno": { | ||
"title": "Lineno", | ||
"exclusiveMinimum": 0, | ||
"type": "integer" | ||
}, | ||
"tags": { | ||
"title": "Tags", | ||
"description": "List of all tags used by keywords.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"inits": { | ||
"title": "Inits", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Keyword" | ||
} | ||
}, | ||
"keywords": { | ||
"title": "Keywords", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Keyword" | ||
} | ||
}, | ||
"dataTypes": { | ||
"title": "Datatypes", | ||
"description": "Deprecated. Use 'typedocs' instead.", | ||
"default": {}, | ||
"type": "object" | ||
}, | ||
"typedocs": { | ||
"title": "Typedocs", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TypeDoc" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"doc", | ||
"version", | ||
"generated", | ||
"type", | ||
"scope", | ||
"docFormat", | ||
"source", | ||
"lineno", | ||
"tags", | ||
"inits", | ||
"keywords", | ||
"typedocs" | ||
], | ||
"definitions": { | ||
"DocumentationType": { | ||
"title": "DocumentationType", | ||
"description": "Type of the doc: LIBRARY or RESOURCE.", | ||
"enum": [ | ||
"LIBRARY", | ||
"RESOURCE" | ||
], | ||
"type": "string" | ||
}, | ||
"LibraryScope": { | ||
"title": "LibraryScope", | ||
"description": "Library scope: GLOBAL, SUITE or TEST.", | ||
"enum": [ | ||
"GLOBAL", | ||
"SUITE", | ||
"TEST" | ||
], | ||
"type": "string" | ||
}, | ||
"DocumentationFormat": { | ||
"title": "DocumentationFormat", | ||
"description": "Documentation format, typically HTML.", | ||
"enum": [ | ||
"ROBOT", | ||
"HTML", | ||
"TEXT", | ||
"REST" | ||
], | ||
"type": "string" | ||
}, | ||
"ArgumentKind": { | ||
"title": "ArgumentKind", | ||
"description": "Argument kind: positional, named, vararg, etc.", | ||
"enum": [ | ||
"POSITIONAL_ONLY", | ||
"POSITIONAL_ONLY_MARKER", | ||
"POSITIONAL_OR_NAMED", | ||
"VAR_POSITIONAL", | ||
"NAMED_ONLY_MARKER", | ||
"NAMED_ONLY", | ||
"VAR_NAMED" | ||
], | ||
"type": "string" | ||
}, | ||
"Argument": { | ||
"title": "Argument", | ||
"description": "Keyword argument.", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "Name", | ||
"type": "string" | ||
}, | ||
"types": { | ||
"title": "Types", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"typedocs": { | ||
"title": "Typedocs", | ||
"description": "Maps types to type information in 'typedocs'.", | ||
"type": "object" | ||
}, | ||
"defaultValue": { | ||
"title": "Defaultvalue", | ||
"description": "Possible default value or 'null'.", | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"kind": { | ||
"$ref": "#/definitions/ArgumentKind" | ||
}, | ||
"required": { | ||
"title": "Required", | ||
"type": "boolean" | ||
}, | ||
"repr": { | ||
"title": "Repr", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"types", | ||
"typedocs", | ||
"kind", | ||
"required", | ||
"repr" | ||
] | ||
}, | ||
"Keyword": { | ||
"title": "Keyword", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "Name", | ||
"type": "string" | ||
}, | ||
"args": { | ||
"title": "Args", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Argument" | ||
} | ||
}, | ||
"doc": { | ||
"title": "Doc", | ||
"type": "string" | ||
}, | ||
"shortdoc": { | ||
"title": "Shortdoc", | ||
"type": "string" | ||
}, | ||
"tags": { | ||
"title": "Tags", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"source": { | ||
"title": "Source", | ||
"type": "string", | ||
"format": "path" | ||
}, | ||
"lineno": { | ||
"title": "Lineno", | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"args", | ||
"doc", | ||
"shortdoc", | ||
"tags", | ||
"source", | ||
"lineno" | ||
] | ||
}, | ||
"TypeDocType": { | ||
"title": "TypeDocType", | ||
"description": "Type of the type: Standard, Enum, TypedDict or Custom.", | ||
"enum": [ | ||
"Standard", | ||
"Enum", | ||
"TypedDict", | ||
"Custom" | ||
], | ||
"type": "string" | ||
}, | ||
"EnumMember": { | ||
"title": "EnumMember", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "Name", | ||
"type": "string" | ||
}, | ||
"value": { | ||
"title": "Value", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"value" | ||
] | ||
}, | ||
"TypedDictItem": { | ||
"title": "TypedDictItem", | ||
"type": "object", | ||
"properties": { | ||
"key": { | ||
"title": "Key", | ||
"type": "string" | ||
}, | ||
"type": { | ||
"title": "Type", | ||
"type": "string" | ||
}, | ||
"required": { | ||
"title": "Required", | ||
"type": [ | ||
"boolean", | ||
"null" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"key", | ||
"type" | ||
] | ||
}, | ||
"TypeDoc": { | ||
"title": "TypeDoc", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"$ref": "#/definitions/TypeDocType" | ||
}, | ||
"name": { | ||
"title": "Name", | ||
"type": "string" | ||
}, | ||
"doc": { | ||
"title": "Doc", | ||
"type": "string" | ||
}, | ||
"usages": { | ||
"title": "Usages", | ||
"description": "List of keywords using this type.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"accepts": { | ||
"title": "Accepts", | ||
"description": "List of accepted argument types.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"members": { | ||
"title": "Members", | ||
"description": "Used only with Enum type.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/EnumMember" | ||
} | ||
}, | ||
"items": { | ||
"title": "Items", | ||
"description": "Used only with TypedDict type.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TypedDictItem" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"type", | ||
"name", | ||
"doc", | ||
"usages", | ||
"accepts" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.