Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update score specification #46

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ MAKEFLAGS += --no-builtin-rules
default:
# Please provide a valid make target

## Update score schema
.PHONY: update-schema
update-schema:
rm -fv schema/files/score-v1b1.json.modified
C=$(shell git rev-parse HEAD); git subtree pull --prefix schema/files git@github.com:score-spec/schema.git main --squash -m "chore: updated score specification"; \
if git rev-parse HEAD | grep -v $$C; then git commit --amend -s --no-edit; fi

## Generate types
.PHONY: generate
generate:
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,9 @@ func main() {

## Upgrading the schema version

When the Score JSON schema is updated in <https://github.com/score-spec/schema>, this repo should be updated to match.
When the Score JSON schema is updated in <https://github.com/score-spec/spec>, this repo should be updated to match.

First update the subtree:

```sh
make update-schema
```
First copy the new `score-v1b1.json` and `samples/` files from the spec repo, into [schema/files](schema/files).

Then regenerate the defined types:

Expand Down
201 changes: 0 additions & 201 deletions schema/files/LICENSE

This file was deleted.

45 changes: 0 additions & 45 deletions schema/files/Makefile

This file was deleted.

34 changes: 0 additions & 34 deletions schema/files/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion schema/files/samples/score-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ resources:
data: here
resource-two2:
type: Resource-Two
resource-three:
resource.three:
type: Type-Three
id: shared-type-three
4 changes: 2 additions & 2 deletions schema/files/score-v1b1.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@
"pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]$"
},
"id": {
"description": "An optional external Resource identifier. When two resources share the same type, class, and id, they are considered the same resource when used across related Workloads. The id must be a valid RFC1123 Label Name of up to 63 characters, including a-z, 0-9, '-' but may not start or end with '-'.",
"description": "An optional Resource identifier. The id may be up to 63 characters, including one or more labels of a-z, 0-9, '-' not starting or ending with '-' separated by '.'. When two resources share the same type, class, and id, they are considered the same resource when used across related Workloads.",
"type": "string",
"minLength": 2,
"maxLength": 63,
"pattern": "^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$"
"pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-+[a-z0-9]+)*)*$"
},
"metadata": {
"description": "The metadata for the Resource.",
Expand Down
12 changes: 6 additions & 6 deletions types/types.gen.go

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

Loading