From 4aaeca8a16df8e3f1e1892d66ae0421ea58c9708 Mon Sep 17 00:00:00 2001 From: rot1024 Date: Sat, 15 Jan 2022 00:53:06 +0900 Subject: [PATCH] move schemas --- .vscode/settings.json | 8 ++++---- pkg/plugin/manifest/parser.go | 2 +- pkg/plugin/manifest/parser_translation.go | 2 +- pkg/plugin/manifest/schema_gen.go | 2 +- .../plugin_manifest.json | 4 ++-- .../plugin_manifest_translation.json | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) rename plugin_manifest_schema.json => schemas/plugin_manifest.json (98%) rename plugin_manifest_schema_translation.json => schemas/plugin_manifest_translation.json (95%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 21b1151e..7f4bc2dd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,10 +6,10 @@ "yaml.validate": true, "yaml.hover": true, "yaml.schemas": { - "./plugin_manifest_schema.json": [ + "./schemas/plugin_manifest.json": [ "/pkg/builtin/manifest.yml" ], - "./plugin_manifest_schema_translation.json": [ + "./schemas/plugin_manifest_translation.json": [ "/pkg/builtin/manifest_*.yml" ] }, @@ -18,13 +18,13 @@ "fileMatch": [ "/pkg/builtin/manifest.json" ], - "url": "./plugin_manifest_schema.json" + "url": "./schemas/plugin_manifest.json" }, { "fileMatch": [ "/pkg/builtin/manifest_*.json" ], - "url": "./plugin_manifest_schema_translation.json" + "url": "./schemas/plugin_manifest_translation.json" } ] } diff --git a/pkg/plugin/manifest/parser.go b/pkg/plugin/manifest/parser.go index 83c9f1ee..e6729cb8 100644 --- a/pkg/plugin/manifest/parser.go +++ b/pkg/plugin/manifest/parser.go @@ -1,6 +1,6 @@ package manifest -//go:generate go run github.com/idubinskiy/schematyper -o schema_gen.go --package manifest ../../../plugin_manifest_schema.json +//go:generate go run github.com/idubinskiy/schematyper -o schema_gen.go --package manifest ../../../schemas/plugin_manifest.json import ( "errors" diff --git a/pkg/plugin/manifest/parser_translation.go b/pkg/plugin/manifest/parser_translation.go index 5bcb209f..0816f4e5 100644 --- a/pkg/plugin/manifest/parser_translation.go +++ b/pkg/plugin/manifest/parser_translation.go @@ -1,7 +1,7 @@ package manifest // Generating types with schema typer for translation schema is disabled because some fields are wrongly typed. -// DISABLED go:generate go run github.com/idubinskiy/schematyper -o schema_translation_gen.go --package manifest --prefix Translation ../../../plugin_manifest_schema_translation.json +// DISABLED go:generate go run github.com/idubinskiy/schematyper -o schema_translation_gen.go --package manifest --prefix Translation ../../../schemas/plugin_manifest_translation.json import ( "errors" diff --git a/pkg/plugin/manifest/schema_gen.go b/pkg/plugin/manifest/schema_gen.go index db3c4e3b..0bb41474 100644 --- a/pkg/plugin/manifest/schema_gen.go +++ b/pkg/plugin/manifest/schema_gen.go @@ -1,6 +1,6 @@ package manifest -// generated by "/var/folders/lz/nhqy382n28g31wb4f_40gbmc0000gp/T/go-build612118365/b001/exe/schematyper -o schema_gen.go --package manifest ../../../plugin_manifest_schema.json" -- DO NOT EDIT +// generated by "/var/folders/lz/nhqy382n28g31wb4f_40gbmc0000gp/T/go-build612118365/b001/exe/schematyper -o schema_gen.go --package manifest ../../../schemas/plugin_manifest.json" -- DO NOT EDIT type Choice struct { Icon string `json:"icon,omitempty"` diff --git a/plugin_manifest_schema.json b/schemas/plugin_manifest.json similarity index 98% rename from plugin_manifest_schema.json rename to schemas/plugin_manifest.json index a149f9b9..037ba972 100644 --- a/plugin_manifest_schema.json +++ b/schemas/plugin_manifest.json @@ -1,7 +1,7 @@ { - "$id": "https://app.reearth.io/schemas/plugin-manifest", + "$id": "https://reearth.io/schemas/plugin_manifest.json", "$schema": "http://json-schema.org/draft-04/schema", - "description": "Re:Earth plugin manifest schema", + "title": "Re:Earth plugin manifest", "definitions": { "id": { "$id": "#id", diff --git a/plugin_manifest_schema_translation.json b/schemas/plugin_manifest_translation.json similarity index 95% rename from plugin_manifest_schema_translation.json rename to schemas/plugin_manifest_translation.json index 2a6f20eb..30dad9d8 100644 --- a/plugin_manifest_schema_translation.json +++ b/schemas/plugin_manifest_translation.json @@ -1,7 +1,7 @@ { - "$id": "https://app.reearth.io/schemas/plugin-manifest-translation", + "$id": "https://reearth.io/schemas/plugin_manifest_translation.json", "$schema": "http://json-schema.org/draft-04/schema", - "description": "Re:Earth plugin manifest schema translation", + "title": "Re:Earth plugin manifest translation", "definitions": { "propertySchemaField": { "$id": "#propertySchemaField",