Skip to content

Commit 933989d

Browse files
committed
feat: update schema manifest doc with schemas
1 parent 21434fe commit 933989d

6 files changed

Lines changed: 96 additions & 1 deletion

File tree

sources/express-schema-manifest/document.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ include::sections/03-terms.adoc[]
3434

3535
include::sections/04-syntax.adoc[]
3636

37+
include::sections/aa-examples.adoc[]
38+
39+
include::sections/ab-schemas.adoc[]
40+
3741
include::sections/99-bibliography.adoc[]

sources/express-schema-manifest/schemas-srl.yml renamed to sources/express-schema-manifest/examples/schemas-srl.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yaml-language-server: $schema=https://www.expresslang.org/schemas/manifest/v1/schema_manifest.yaml
12
---
23
schemas:
34
action_and_model_relationships_schema:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
$schema: http://json-schema.org/draft-07/schema#
2+
title: EXPRESS Schema Manifest
3+
description: Defines a cohesive set of EXPRESS schemas and their locations.
4+
type: object
5+
required:
6+
- schemas
7+
additionalProperties: false
8+
properties:
9+
path:
10+
type: string
11+
description: >-
12+
(optional) Root path for all schemas. If not set, the root path is set to
13+
the directory where the manifest file is located. Can be an absolute path
14+
or include shell expansions like ~ for home directory.
15+
schemas:
16+
type: object
17+
description: >-
18+
Map of schema names to their configurations. Each key is the name
19+
of an EXPRESS schema.
20+
additionalProperties:
21+
oneOf:
22+
- type: "null"
23+
description: >-
24+
Schema uses default path pattern: `{root_path}/{schema_name}.exp`.
25+
- type: object
26+
description: >-
27+
Schema configuration with explicit path.
28+
additionalProperties: false
29+
properties:
30+
path:
31+
type: string
32+
description: >-
33+
Path to the schema file, relative to root path or absolute.
34+
Relative paths that do not start with `/` are considered relative
35+
to the root path. `..` can be used to refer to parent directories.
36+
Can include shell expansions like `~`.

sources/express-schema-manifest/sections/04-syntax.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[syntax]]
12
== Syntax
23

34
=== General
@@ -28,7 +29,7 @@ schemas: <2>
2829
# ...
2930
----
3031
<1> (optional) Root path
31-
<2> (mandatory)Schema listings
32+
<2> (mandatory) Schema listings
3233
<3> (mandatory) Individual EXPRESS schema names
3334
<4> (optional) Individual schema path
3435

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[appendix,obligation=informative]
2+
== Examples
3+
4+
This annex provides examples of the EXPRESS Schema Manifest format.
5+
6+
This example shows a schema manifest that defines a selection of schemas from
7+
the SRL (STEP Resource Library).
8+
9+
[source,yaml]
10+
----
11+
include::../examples/schemas-srl.yaml[]
12+
----
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[appendix,obligation=normative]
2+
== Schemas
3+
4+
=== General
5+
6+
This annex provides the YAML Schema definitions for the EXPRESS Schema Manifest YAML
7+
format defined in this document.
8+
9+
This schema can be used to validate EXPRESS Schema Manifest YAML files and to
10+
generate documentation or tooling for working with EXPRESS change records.
11+
12+
The schemas are defined in YAML Schema format that follows the JSON Schema
13+
format (draft-07).
14+
15+
The schema change schema defines the structure for recording modifications to
16+
EXPRESS schema structure across versions, as described in <<syntax>>.
17+
18+
[source,yaml]
19+
----
20+
include::../schemas/schema_manifest.yaml[]
21+
----
22+
23+
This schema can be used for validation by prefixing an EXPRESS Schema Manifest
24+
YAML file with the following comment line:
25+
26+
[source,yaml]
27+
----
28+
# yaml-language-server: $schema=https://www.expresslang.org/schemas/manifest/v1/schema_manifest.yaml
29+
----
30+
31+
[example]
32+
====
33+
[source,yaml]
34+
----
35+
# yaml-language-server: $schema=https://www.expresslang.org/schemas/manifest/v1/schema_manifest.yaml
36+
---
37+
schemas:
38+
action_schema:
39+
path: ./schemas/action_schema.exp
40+
----
41+
====

0 commit comments

Comments
 (0)