Skip to content

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Jul 10, 2025

Schema $id must point to a JSON fine that can be downloaded. Previous one was a github website link that cannot be used. This is critical as JSON schema tools will try to update the schema using its $id.

Example of correctly configured $id: https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/schemas/galaxy.json#L743

Schema $id must point to a JSON fine that can be downloaded. Previous
one was a github webside link that cannot be used. This is critical
as JSON schema tools will try to update the schema using its $id.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the JSON Schema $id to point at a raw file URL instead of a GitHub HTML page, ensuring schema tools can fetch it directly.

  • Replaces the GitHub blob link with a raw.githubusercontent.com link.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/ansible/pattern-service/blob/main/specifications/pattern_specification.json",
"$id": "https://raw.githubusercontent.com/ansible/pattern-service/refs/heads/main/specifications/pattern_specification.json",
Copy link
Preview

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raw GitHub URL should use the branch name directly rather than ‘refs/heads/main’. For example:
"$id": "https://raw.githubusercontent.com/ansible/pattern-service/main/specifications/pattern_specification.json",

Suggested change
"$id": "https://raw.githubusercontent.com/ansible/pattern-service/refs/heads/main/specifications/pattern_specification.json",
"$id": "https://raw.githubusercontent.com/ansible/pattern-service/main/specifications/pattern_specification.json",

Copilot uses AI. Check for mistakes.

Copy link

@GomathiselviS
Copy link
Contributor

Hi @ssbarnea, thank you for this PR. The changes here have been superseded by the work in PR #31 .

I am closing this PR in favor of the other one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants