Skip to content

Commit 5b4e740

Browse files
authored
Fix GitHub workflow schema and update documentation (SchemaStore#4751)
1 parent 4dcfb87 commit 5b4e740

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,30 +98,14 @@ The goal of JSON Schemas in this repository is to correctly validate schemas tha
9898
### Useful Conventions
9999

100100
- Consider using documentation URLs in `"description"` to improve UX. Most schemas use the format `<description>\n<url>`. For example: `"Whether to ignore a theme configuration for the current site\nhttps://jekyllrb.com/docs/configuration/options/#global-configuration"`
101-
- Consider using the [`base.json`][base] schema for `draft-07` or [`base-04.json`][base-04] for `draft-04` to use subschemas that are commonly used.
102101
- When writing `description`, avoid phrases like "there are three possibilities" and "valid values are" in favor of adding the constraints to the schema directly.
103102
- If you choose to use `title`, we recommend formatting it so that object values look like types in programming languages. This includes:
104103
- Omitting leading articles and trailing punctuation
105104
- Beginning it with a lowercase letter
106105
- Using nouns instead of sentences
107106

108-
**Unofficial Strict Mode**
109-
110-
> [!WARNING]
111-
> This "unofficial strict mode" may have bugs or be incomplete.
112-
113-
There is an [unofficial draft-07][draft-07-unofficial-strict] schema that uses JSON Schema to validate your JSON Schema. It checks that:
114-
115-
- `type`, `title`, `description` properties are required
116-
- There are no empty arrays. For instance, it's impossible to write less than 2 sub-schemas for `allOf`
117-
- `type` can't be an array, which is intentional, `anyOf`/`oneOf` should be used in this case
118-
- It links to [understanding-json-schema](https://json-schema.org/understanding-json-schema) for each hint/check
119-
120-
To check your schema against that schema, use `node cli.js check-strict --schema-name=<schemaName.json>`. Note that this is NOT the same as Ajv strict mode.
121-
122107
[base]: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/base.json
123108
[base-04]: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/base-04.json
124-
[draft-07-unofficial-strict]: https://json.schemastore.org/metaschema-draft-07-unofficial-strict.json
125109

126110
#### Avoiding Overconstraint
127111

src/schemas/json/hugo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@
672672
"term",
673673
"rss",
674674
"sitemap",
675-
"robotsTXT",
675+
"robotstxt",
676676
"404"
677677
]
678678
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# yaml-language-server: $schema=../../schemas/json/github-workflow.json
2+
on: 'create'
3+
jobs:
4+
ci:
5+
runs-on: unknown

0 commit comments

Comments
 (0)