Skip to content
pkm-java-comments-schema.json 1.75 KiB
Newer Older
{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "https://gitlab.ow2.org/decoder/pkm-api/-/tree/master/api/pkm-java-comments-schema.json",
	"title": "Java comment JSON Schema.",
	"description": "Java comment JSON Schema.",
	"type": "object",
	"additionalProperties": false,
	"properties": {
		"fileEncoding": {
			"type": "string"
		},
		"comments": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/JavaComment"
			}
		},
		"fileMimeType": {
			"type": "string"
		},
		"sourceFile": {
			"type": "string"
		},
		"fileFormat": {
			"type": "string"
		},
		"type": {
			"type": "string",
			"description": "type of document for the GUI, typically 'Comment'"
		}
	},
	"required": [
		"comments",
		"fileEncoding",
		"fileFormat",
		"fileMimeType",
		"sourceFile"
	],
	"definitions": {
		"JavaLoc": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"pos_start": {
					"$ref": "#/definitions/JavaPos"
				},
				"pos_end": {
					"$ref": "#/definitions/JavaPos"
				}
			},
			"required": [
				"pos_end",
				"pos_start"
			],
			"title": "LOC"
		},
		"JavaPos": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"pos_cnum": {
					"type": "integer"
				},
				"pos_lnum": {
					"type": "integer"
				}
			},
			"required": [
				"pos_cnum",
				"pos_lnum"
			],
			"title": "Pos"
		},
		"JavaComment": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"loc": {
					"$ref": "#/definitions/JavaLoc"
				},
				"commentInEnvironment": {
					"type": "string"
				},
				"comments": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"comments",
				"commentInEnvironment",
				"loc"
			],
			"title": "Comment"
		}
	}
}