Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
move schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jan 14, 2022
1 parent d130808 commit 4aaeca8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
Expand All @@ -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"
}
]
}
2 changes: 1 addition & 1 deletion pkg/plugin/manifest/parser.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/manifest/parser_translation.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/manifest/schema_gen.go
Original file line number Diff line number Diff line change
@@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions plugin_manifest_schema.json → schemas/plugin_manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 4aaeca8

Please sign in to comment.