Skip to content

Commit

Permalink
Merge pull request #333 from nberth/superbol-schema
Browse files Browse the repository at this point in the history
New JSON schema for `superbol.toml`
  • Loading branch information
nberth committed Jul 30, 2024
2 parents 52a1f6c + 389a95d commit b20fcb1
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [0.1.4] Next release

### Added
- Configuration setting for copybook filename extensions [#332](https://github.com/OCamlPro/superbol-studio-oss/pull/332)
- Configuration setting for copybook filename extensions [#332](https://github.com/OCamlPro/superbol-studio-oss/pull/332), with updated JSON schema [#333](https://github.com/OCamlPro/superbol-studio-oss/pull/333)
- COBOL language configuration for highlighting matching brackets and auto-insertion of line numbers in fixed-format code [#330](https://github.com/OCamlPro/superbol-studio-oss/pull/330)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions schemas/superbol-schema-0.1.4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://get-superbol.com/superbol-schema-0.1.4.json",
"title": "Schema for superbol.toml files",
"description": "Configuration file for SuperBOL Studio",
"type": "object",
"properties": {
"cobol": {
"type": "object",
"required": ["dialect", "source-format"],
"properties": {
"dialect": {
"description": "Default COBOL dialect; \"default\" is equivalent to \"gnucobol\"",
"enum": [
"default",
"gnucobol",
"cobol85",
"cobol2002",
"cobol2014",
"acu",
"acu-strict",
"bs2000",
"bs2000-strict",
"gcos",
"gcos-strict",
"ibm",
"ibm-strict",
"mf",
"mf-strict",
"mvs",
"mvs-strict",
"realia",
"realia-strict",
"rm",
"rm-strict",
"xopen"
]
},
"source-format": {
"description": "Source reference format.",
"enum": [
"auto",
"fixed",
"free",
"cobol85",
"variable",
"xopen",
"xcard",
"crt",
"terminal",
"cobolx"
]
},
"copybooks": {
"type": "array",
"description": "List of copybooks paths",
"items": {
"type": "object",
"required": ["dir"],
"properties": {
"dir": {
"description": "Path to copybooks",
"type": "string"
},
"file-relative": {
"type": "boolean"
}
}
}
},
"copyexts": {
"type": "array",
"description": "File extensions for copybook resolution",
"items": {
"type": "string"
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/lsp/superbol_free_lib/vscode_extension.ml
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ let contributes =
Manifest.tomlValidation
~fileMatch:"superbol.toml"
(* TODO: change this address to a more permanent one; also, substitute `master` for a version tag *)
~url:"https://raw.githubusercontent.com/OCamlPro/superbol-studio-oss/master/schemas/superbol-schema.json";
~url:"https://raw.githubusercontent.com/OCamlPro/superbol-studio-oss/master/schemas/superbol-schema-0.1.4.json";
]

let manifest =
Expand Down

0 comments on commit b20fcb1

Please sign in to comment.