Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajmarkow/espanso-schema-json
A schema definition following the JSON Schema specification. It describes the requirements and options for YAML objects for the configuration files of the text expander program Espanso (https://espanso.org).
https://github.com/ajmarkow/espanso-schema-json
espanso json-schema
Last synced: about 2 months ago
JSON representation
A schema definition following the JSON Schema specification. It describes the requirements and options for YAML objects for the configuration files of the text expander program Espanso (https://espanso.org).
- Host: GitHub
- URL: https://github.com/ajmarkow/espanso-schema-json
- Owner: ajmarkow
- Created: 2023-09-14T04:40:54.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-16T01:49:42.000Z (about 1 year ago)
- Last Synced: 2024-08-09T02:18:52.199Z (5 months ago)
- Topics: espanso, json-schema
- Homepage: https://ajm.codes/Espanso_Matches_File_Schema.json
- Size: 170 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - ajmarkow/espanso-schema-json - A schema definition following the JSON Schema specification. It describes the requirements and options for YAML objects for the configuration files of the text expander program Espanso (https://espans (Others)
README
# Espanso JSON Schemas
- [About](#about)
- [Schemas](#schemas)
- [Usage](#usage)## About
These are JSON Schema Specification compliant Schemas, which describe the requirements and options for YAML configuration and match files for the program Espanso. Based upon the documentation at .
## Schemas
This repository includes 3 schemas. The links below are updated to the most recent version with each update:
- [Espanso_Matches_File_Schema.json](https://ajm.codes/Espanso_Matches_File_Schema.json) ← A schema for a match file, either the base file, or an application specific file.
- [Espanso_Match_Schema.json](https://ajm.codes/Espanso_Match_Schema.json) ← A schema for individual matches within a match file.
- [Espanso_Config_File_Schema.json](https://ajm.codes/Espanso_Config_File_Schema.json) ← A schema for espanso configuration files, either the base file, or application specific configurations.## Usage
1. **Prerequisites**:
- Before using this schema to validate your Espanso .yml files in VS Code, make sure you have the YAML extension installed in VS Code.
- You can find the extension [here](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).
- Clone the schemas folder to your computer.2. **Configuration**: To enable validation, add the following line to any Espanso match files where you want validation:
```yaml
# yaml-language-server: $schema=(PATH)
```- Replace `(PATH)` with the actual path to the `Espanso_Matches_File_Schema.json` file, located in the schemas folder on your system.
- Ensure that both `Espanso_Matches_File_Schema.json` and `Espanso_Match_Schema.json` are downloaded and kept in the same directory.
- Note that `Espanso_Matches_File_Schema.json` depends on `Espanso_Match_Schema.json`.3. **Validation and Completion**: After configuration, any errors will be displayed in the problems pane of VS Code. You can also take advantage of IntelliSense completions while manually editing your configuration files, like `base.yml`.
4. **Integration**: This schema is also utilized for validation in the [total_rewrite_of_snippet_cli_gem](https://github.com/ajmarkow/total_rewrite_of_snippet_cli_gem) project.
### TODO ↓
- Implement conditions on any remaining invalid form property combinations. By refactoring lines 105-154
## Resources
- Good tool to check schema/json doc for compliance with spec:
- Tools for working with YAML & JSON from [JSON Formatter](https://jsonformatter.org/#:~:text=SOAP%20Formatter-,YAML,-YAML%20Validator).
- Build a react UI from a JSON Schema using [react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form).## License
- This software is licensed under the [GNU GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) V3.