Skip to content

Commit

Permalink
Clarify in docs that schemaType isn't supported on porter.yaml (#2349)
Browse files Browse the repository at this point in the history
* Clarify in docs that schemaType isn't supported on porter.yaml

I had originally documented that schemaType was supported on porter.yaml
files but then forgot to add it to the manifest data structure (since
it's not actually used, it's just a planned helper field for  VS Code
autocomplete in the future).

When `schemaType: Bundle` is set in porter.yaml, it causes the manifest
to fail validation.

Since this isn't a showstopping problem, more of too eager
documentation, I am updating the documentation for porter.yaml to
clarify that schemaType isn't supported yet.

Post v1, we can fix this bug in a patch.

Signed-off-by: Carolyn Van Slyck <[email protected]>

* Update golden file to match updated bundle schema without schemaType

Signed-off-by: Carolyn Van Slyck <[email protected]>

* Update another golden file with the latest schema

Signed-off-by: Carolyn Van Slyck <[email protected]>

Signed-off-by: Carolyn Van Slyck <[email protected]>
  • Loading branch information
carolynvs authored Sep 9, 2022
1 parent 0437df7 commit 5741c91
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 19 deletions.
2 changes: 0 additions & 2 deletions docs/content/bundle/manifest/file-format/1.0.0-alpha.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Bundle manifest file format version 1.0.0-alpha.1 is compatible with v1.0.0-alph

## Example
```yaml
schemaType: Bundle
schemaVersion: 1.0.0
name: myapp
version: 1.0.0
Expand Down Expand Up @@ -140,7 +139,6 @@ status:
| Field | Required | Description |
|----------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| schemaType | false | The type of document. This isn't used by Porter but is included when Porter outputs the file, so that editors can determine the resource type. |
| schemaVersion | true | The version of the Bundle schema used in this file. |
| name | true | The name of the bundle. |
| version | true | The version of the bundle, must adhere to [semver v2].<br/>The bundle tag defaults to the version with a v prefix, e.g. mybundle:v1.0.0. Use --tag or the reference field to override. |
Expand Down
4 changes: 2 additions & 2 deletions docs/content/bundle/manifest/file-format/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Below are schema versions for the Porter manifest, and the corresponding Porter
| Bundle | [1.0.0-alpha.1](./1.0.0-alpha.1/) | v1.0.0-alpha.14+ |
| Bundle | [1.0.0](./1.0.0/) | v1.0.0-beta.2+ |

🚨 The schemaType field is not yet supported on porter.yaml files, setting it will cause an error.

Starting with schemaVersion 1.0.0, the template delimiter was changed to `${ }` from `{{ }}` to avoid compatibility and escaping problems with YAML.
Template delimiters are no longer required to be in quoted strings, and can now be used to inject non-string types, such as booleans or numbers.

Expand All @@ -32,7 +34,6 @@ The [schema-check] configuration setting allows you to change how Porter behaves
## Example

```yaml
schemaType: Bundle
schemaVersion: 1.0.0
name: myapp
version: 1.0.0
Expand Down Expand Up @@ -165,7 +166,6 @@ status:
| Field | Required | Description |
|----------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| schemaType | false | The type of document. This isn't used by Porter but is included when Porter outputs the file, so that editors can determine the resource type. |
| schemaVersion | true | The version of the Bundle schema used in this file. |
| name | true | The name of the bundle. |
| version | true | The version of the bundle, must adhere to [semver v2].<br/>The bundle tag defaults to the version with a v prefix, e.g. mybundle:v1.0.0. Use --tag or the reference field to override. |
Expand Down
5 changes: 0 additions & 5 deletions pkg/porter/testdata/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,6 @@
"type": "array",
"uniqueItems": true
},
"schemaType": {
"default": "Bundle",
"description": "The resource type of the current document.",
"type": "string"
},
"schemaVersion": {
"description": "The version of the schema used in this file",
"type": "string"
Expand Down
5 changes: 0 additions & 5 deletions pkg/schema/manifest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,6 @@
}
},
"properties": {
"schemaType": {
"description": "The resource type of the current document.",
"type": "string",
"default": "Bundle"
},
"schemaVersion": {
"description": "The version of the schema used in this file",
"type": "string"
Expand Down
5 changes: 0 additions & 5 deletions tests/integration/testdata/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,6 @@
"type": "array",
"uniqueItems": true
},
"schemaType": {
"default": "Bundle",
"description": "The resource type of the current document.",
"type": "string"
},
"schemaVersion": {
"description": "The version of the schema used in this file",
"type": "string"
Expand Down

0 comments on commit 5741c91

Please sign in to comment.