Skip to content

Commit 2dce5ac

Browse files
committed
Correct date format YYYY-MM-DD
1 parent 2efd6ce commit 2dce5ac

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

scripts/schema-convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function convert(filename,date) {
2424
}
2525

2626
if (process.argv.length<4) {
27-
console.warn('Usage: convert-schema.js file.yaml YYYYMMDD');
27+
console.warn('Usage: convert-schema.js file.yaml YYYY-MM-DD');
2828
}
2929
else {
3030
convert(process.argv[2], process.argv[3]);

scripts/schema-publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
for filename in schemas/v3*/schema.yaml ; do
88
vVersion=$(basename $(dirname "$filename"))
99
version=${vVersion:1}
10-
lastCommitDate=$(git log -1 --format="%ad" --date=format:"%Y%m%d" "$filename")
10+
lastCommitDate=$(git log -1 --format="%ad" --date=short "$filename")
1111

1212
echo "$filename $lastCommitDate"
1313
mkdir -p deploy/oas/$version/schema

tests/schema-convert/fixtures/schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"id": "https://spec.openapis.org/oas/3.0/schema/87654321",
3-
"$id": "https://spec.openapis.org/oas/3.0/schema/87654321",
4-
"$ref": "path/to/somewhere/87654321",
2+
"id": "https://spec.openapis.org/oas/3.0/schema/8765-43-21",
3+
"$id": "https://spec.openapis.org/oas/3.0/schema/8765-43-21",
4+
"$ref": "path/to/somewhere/8765-43-21",
55
"other": {
66
"foo": "bar"
77
}

tests/schema-convert/fixtures/schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
id: https://spec.openapis.org/oas/3.0/schema/20241017
1+
id: https://spec.openapis.org/oas/3.0/schema/2024-10-17
22
$id: https://spec.openapis.org/oas/3.0/schema/some-iteration
33
$ref: path/to/somewhere/replace-last-segment
44
other:

tests/schema-convert/schema-convert.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe("Convert Schemas", async () => {
1111
const output = await convert(
1212
[
1313
"schema.yaml",
14-
"87654321",
14+
"8765-43-21",
1515
],
1616
folder,
1717
);
@@ -36,7 +36,7 @@ describe("Convert Schemas", async () => {
3636
],
3737
folder,
3838
);
39-
expect(output.stderr).to.equal("Usage: convert-schema.js file.yaml YYYYMMDD\n");
39+
expect(output.stderr).to.equal("Usage: convert-schema.js file.yaml YYYY-MM-DD\n");
4040
});
4141
});
4242

0 commit comments

Comments
 (0)