-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(training): create json schema to validate filesystemtree (#2485)
## Proposed change <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. --> ## Related issues <!-- Please make sure to follow the [contribution guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md) --> *- No issue associated -* <!-- * 🐛 Fix #issue --> <!-- * 🐛 Fix resolves #issue --> <!-- * 🚀 Feature #issue --> <!-- * 🚀 Feature resolves #issue --> <!-- * Pull Request #issue -->
- Loading branch information
Showing
6 changed files
with
449 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
apps/showcase/schemas/webcontainer-file-system-tree.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "WebContainerFileSystemTreeSchema", | ||
"description": "Schema of a webcontainer api file system tree", | ||
"required": ["fileSystemTree"], | ||
"properties": { | ||
"fileSystemTree": { | ||
"$ref": "#/definitions/FileSystemTree" | ||
} | ||
}, | ||
"definitions": { | ||
"FileSystemTree": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"oneOf": [ | ||
{"$ref": "#/definitions/DirectoryNode"}, | ||
{"$ref": "#/definitions/FileNode"}, | ||
{"$ref": "#/definitions/SymlinkNode"} | ||
] | ||
} | ||
}, | ||
"DirectoryNode": { | ||
"type": "object", | ||
"required": ["directory"], | ||
"properties": { | ||
"directory": { | ||
"$ref": "#/definitions/FileSystemTree" | ||
} | ||
} | ||
}, | ||
"FileNode": { | ||
"type": "object", | ||
"required": [ | ||
"file" | ||
], | ||
"properties": { | ||
"file": { | ||
"type": "object", | ||
"description": "Metadata type", | ||
"required": ["contents"], | ||
"properties": { | ||
"contents": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"SymlinkNode": { | ||
"type": "object", | ||
"required": [ | ||
"file" | ||
], | ||
"properties": { | ||
"file": { | ||
"type": "object", | ||
"description": "Metadata type", | ||
"required": ["symlink"], | ||
"properties": { | ||
"symlink": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
748 changes: 371 additions & 377 deletions
748
apps/showcase/src/assets/trainings/sdk/shared/monorepo-template.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters