mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-09-13 14:29:09 +00:00
Add Fallback Resource Json Schemas
This commit is contained in:
parent
b0a66d5dbf
commit
eb55164696
2 changed files with 249 additions and 0 deletions
18
api/schema_test.go
Normal file
18
api/schema_test.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestResourceJsonSchema(t *testing.T) {
|
||||
for slug, schema := range ResourceSchemas {
|
||||
var schemaDefinition ResourceTypeSchema
|
||||
err := json.Unmarshal(schema, &schemaDefinition)
|
||||
if err != nil {
|
||||
t.Errorf("Error While Parsing Resource Schema %v: %v", slug, err)
|
||||
} else {
|
||||
t.Logf("Schema for type %v is ok", slug)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue