10000 chore: added json schema for configuration file by Bikappa · Pull Request #2068 · arduino/arduino-cli · GitHub
[go: up one dir, main page]

Skip to content

chore: added json schema for configuration file #2068

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

Merged
merged 28 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ed29087
chore: added json schema for configuration file
Feb 8, 2023
fb6e552
fix: additional_urls type
Feb 10, 2023
8aa6453
fix(ci): tasks conditions
Feb 10, 2023
b967fe4
Merge branch 'master' into chore/json-schema
Bikappa Feb 10, 2023
3d24c9b
Update .github/workflows/release-go-task.yml
Bikappa Feb 16, 2023
6f7a4c7
Update configuration/configuration.schema.json
Bikappa Feb 16, 2023
19b12de
Update configuration/configuration.schema.json
Bikappa Feb 16, 2023
d096c6d
Update DistTasks.yml
Bikappa Feb 16, 2023
f7e5f86
chore: refine schema
Feb 16, 2023
ca67a90
Merge branch 'chore/json-schema' of github.com:arduino/arduino-cli in…
Feb 16, 2023
99eb639
test: validate json schema
Feb 16, 2023
f12b648
Update configuration/configuration.schema.json
Bikappa Feb 16, 2023
1e68bcb
Merge branch 'master' into chore/json-schema
Bikappa Feb 16, 2023
f89612d
chore: schema updates
Feb 16, 2023
15a26dd
chore: update schema
Feb 16, 2023
9e4d7d7
Update configuration/configuration.schema.json
Bikappa Feb 16, 2023
8ad388e
chore: refined workflows
Feb 16, 2023
fd94ccd
Merge branch 'chore/json-schema' of github.com:arduino/arduino-cli in…
Feb 16, 2023
34d95f8
Update configuration/configuration.schema.json
Bikappa Feb 17, 2023
1d51c36
Update configuration/configuration.schema.json
Bikappa Feb 17, 2023
87ce9b7
Merge branch 'master' into chore/json-schema
Bikappa Feb 17, 2023
20a990e
fix: json
Feb 17, 2023
a46c294
Update docs/configuration.md
Bikappa Feb 20, 2023
23aeee2
chore: reorder paragraph
Feb 20, 2023
7b64b03
Merge branch 'master' into chore/json-schema
Bikappa Feb 20, 2023
3215547
Merge branch 'chore/json-schema' of github.com:arduino/arduino-cli in…
Feb 20, 2023
46cf49b
Update configuration/configuration.schema.json
Bikappa Feb 21, 2023
46fadf1
Merge branch 'master' into chore/json-schema
Bikappa Feb 21, 2023
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
Prev Previous commit
Next Next commit
test: validate json schema
  • Loading branch information
Luca Bianconi committed Feb 16, 2023
commit 99eb639d119fa42aa398a11f601cea018162cb8c
19 changes: 19 additions & 0 deletions configuration/configuration_schema_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package configuration

import (
"io/ioutil"
"testing"

"github.com/stretchr/testify/require"
"github.com/xeipuuv/gojsonschema"
)

func TestConfigurationSchemaValidity(t *testing.T) {
schemaBytes, err := ioutil.ReadFile("configuration.schema.json")
require.NoError(t, err)

jl := gojsonschema.NewBytesLoader(schemaBytes)
sl := gojsonschema.NewSchemaLoader()
_, err = sl.Compile(jl)
require.NoError(t, err)
}
3 changes: 3 additions & 0 deletions docsgen/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ require (

require (
github.com/rogpeppe/go-internal v1.3.0
github.com/xeipuuv/gojsonschema v1.2.0
go.bug.st/testifyjson v1.1.1
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
gopkg.in/yaml.v3 v3.0.1
Expand Down Expand Up @@ -88,6 +89,8 @@ require (
github.com/subosito/gotenv v1.2.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
0