{"id":26871648,"url":"https://github.com/not-first/glance-schema","last_synced_at":"2025-03-31T07:30:10.940Z","repository":{"id":284515382,"uuid":"955126779","full_name":"not-first/glance-schema","owner":"not-first","description":"A JSON schema detailing the Glance config file.","archived":false,"fork":false,"pushed_at":"2025-03-26T09:29:03.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T09:41:12.343Z","etag":null,"topics":["glance","schema"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/not-first.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-26T06:33:58.000Z","updated_at":"2025-03-26T09:29:07.000Z","dependencies_parsed_at":"2025-03-26T09:41:15.315Z","dependency_job_id":"a7dff315-cde9-4116-b465-3e78d13550e0","html_url":"https://github.com/not-first/glance-schema","commit_stats":null,"previous_names":["not-first/glance-schema"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-first%2Fglance-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-first%2Fglance-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-first%2Fglance-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/not-first%2Fglance-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/not-first","download_url":"https://codeload.github.com/not-first/glance-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246432539,"owners_count":20776426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["glance","schema"],"created_at":"2025-03-31T07:30:10.348Z","updated_at":"2025-03-31T07:30:10.931Z","avatar_url":"https://github.com/not-first.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Glance Schema\n*A JSON schema detailing the [Glance](https://github.com/glanceapp/glance) config file.*\n\n\u003e [!NOTE]\n\u003e Currently supports version: v0.7.9\n\n## Usage\nFor custom usage, the schema link can be found at https://raw.githubusercontent.com/not-first/glance-schema/master/schema.json.\n\n### VS Code\nIf you use VS Code to edit your `glance.yml`, the schema can be used to provide typing completions, hover descriptions and incorrect configuration errors.\n\n1. Install the [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).\n2. At the top of your `glance.yml` file, add this line:\n   ```yaml\n   # yaml-language-server: $schema=https://raw.githubusercontent.com/not-first/glance-schema/master/schema.json\n   ```\n  3. Done.\n\n## Planned Features\n- Widget specific parameter requirements\n  - DNS stats widget, correct restriction of `username`, `password` and `token` field depending on service.\n- autocomplete, validation and description for the $insert parameter\n\n## Known Limitations\nAlthough the schema allows using the `$include` parameter to include other files, it will not work correctly if you set up validation for these additional files. There is because Glance is very flexible in the structure of an added file (a seperate file can contain a widget, a page, properties etc).\n\nSome error messages can be autogenerated by the schema validator and are unhelpful to figure out what is wrong. Please create an issue if you experience one.\n\n## Contribution\n\nAny help in maintaining the schema is appreciated. This may include:\n- Adding new widgets\n- Updating widget properties as they change\n- Updating property descriptions to be more specific/helpful\n- Updating property examples\n\n### Schema Generation Script\nIn order to make building the schema easier, it is split into a file per each base property (e.g server, branding, pages) and widgets. A script is then run to build a singular JSON file for the schema.\n\n#### Local Testing\nTo test locally, install the packages `alive-progress` and `pyyaml` in a python environment and run the script in `scripts/generate-schema.py`. It will generate a `schema.json` at the root of the repo. Then use:\n```\nyaml-language-server: $schema=file://{PATH_TO_YOUR_SCHEMA.JSON}\n```\nat the top of any `glance.yml` to test the locally generated version of the schema (in vscode).\n\nRemove this `schema.json` file from your commit if possible, as it is built by a Github Action on push to ensure consistency. A locally generated schema will function the same as one generated automatically.\n\n#### Script Functionality\n1. Combines all the top-level properties into the base schema template (branding, pages etc)\n2. Loads the widget base properties, creates a specific schema combining this with every widget file\n3. Creates a definition for each widget and reference it in the schema\n4. Output schema to `schema.json`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnot-first%2Fglance-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnot-first%2Fglance-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnot-first%2Fglance-schema/lists"}