Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove URL hashes in catalog #2858

Closed
wants to merge 4 commits into from

Conversation

@remcohaszing
Copy link
Contributor Author

Two rules seem to be conflicting here:

  1. Schemas using $ref may not specify additional properties
  2. Schemas must specify $schema at the top level.

@hyperupcall
Copy link
Member

hyperupcall commented Mar 31, 2023

I am not aware of any rules that require $schema at the top level (maybe that is a requirement of the yaml-language-server?), but I was the one that wrote the rule that required no additional properties if $ref was specified. I guess at the time I didn't think top-level $refs could use a hash (which would mean $schema would need to be specified). I originally wrote the rule because sometimes the $schema specified at the top level would be (and sometimes was) different than the schema referenced to with $ref. I suppose to get these changes through you can comment out the local_assert_schema_top_level_$ref_is_standalone rule for now I can fix it later.

On a separate note, are you specifying title in each of the schemas because you need to? I thought that if you specified, say, "title": "Ansible Playbook" on "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook", you wouldn't need to set title in src/schemas/json/ansible-playbook.json. Since I thought properties (like title and $schema) would "passthrough".

@github-actions github-actions bot added the cli.js gruntfile.js is updated (auto-generated by labeler action) label Apr 1, 2023
@remcohaszing
Copy link
Contributor Author

The $schema property is only there to aid schema authors. It’s not needed otherwise. I changed local_assert_top_level_$ref_is_standalone to allow it.

title should be removed indeed.

Now tests fail to resolve a $ref referencing an external URL.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Jun 1, 2023
@remcohaszing
Copy link
Contributor Author

This issue is still relevant.

@github-actions github-actions bot removed the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Jun 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Aug 2, 2023
@remcohaszing
Copy link
Contributor Author

This issue is still relevant.

@github-actions github-actions bot removed the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Aug 3, 2023
@github-actions
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Oct 17, 2023
@github-actions
Copy link
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Oct 25, 2023
@hyperupcall hyperupcall reopened this Nov 13, 2023
@github-actions github-actions bot removed the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Nov 14, 2023
Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale PR is stale and will be closed in 7 days(auto-generated by stale action) label Jan 13, 2024
Copy link
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli.js gruntfile.js is updated (auto-generated by labeler action) Stale PR is stale and will be closed in 7 days(auto-generated by stale action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants