Skip to content

Fix schema_catalog_schema.json#152

Open
roberth wants to merge 2 commits intohmcts:mainfrom
roberth:json-schema-catalog
Open

Fix schema_catalog_schema.json#152
roberth wants to merge 2 commits intohmcts:mainfrom
roberth:json-schema-catalog

Conversation

@roberth
Copy link
Copy Markdown

@roberth roberth commented May 22, 2025

Jira link

See PROJ-XXXXXX

Change description

This makes it possible to validate _the catalog fieldof_json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json`.

It matches exactly the changes I've made in my adaptation, https://github.com/roberth/json-schema-catalog-rs

Testing done

--- a/json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json
+++ b/json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json
@@ -1,5 +1,4 @@
 {
-  "catalog": {
     "name": "my catalog",
     "groups": [
       {
@@ -28,4 +27,3 @@
       }
     ]
   }
-}

Run jsonschema-cli

$ nix shell nixpkgs#jsonschema-cli
$ jsonschema-cli -i json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json json-schema-catalog/catalog-core/src/main/resources/schema_catalog_schema.json

Security Vulnerability Assessment

CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?

  • Yes
  • No

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
    • Would appreciate some help / pointers, as I'm unfamiliar and I don't have a dev setup for this project.
  • Does this PR introduce a breaking change
    • Probably not? It seems that the schema was written, but never tested. I don't think it could get worse in mechanical terms. Is my proposed change to the catalog_test_valid.json file correct?

This makes it possible to validate _the `catalog` field` of_
`json-schema-catalog/catalog-core/src/test/resources/catalog_test_valid.json`.

It matches exactly the changes I've made in my adaptation,
https://github.com/roberth/json-schema-catalog-rs
@roberth roberth requested a review from a team as a code owner May 22, 2025 22:21
@roberth roberth requested review from dawidstrozak, ishdeepdulkoan and js-hmcts and removed request for a team May 22, 2025 22:21
@roberth
Copy link
Copy Markdown
Author

roberth commented May 22, 2025

I can not see the log with my freshly dusted off Microsoft account.

You cannot access this right now

Your sign-in was successful but does not meet the criteria to access this resource. For example, you might be signing in from a browser, app, or location that is restricted by your admin.

I'm Dutch and I'm in the Netherlands, if that's useful info.

It does not appear to be referenced by any tests, so I have adapted
it to the schema instead of adapting the schema to the instance.

Since I can't get the poms to work, I am unable to add a test that
validates it.
@sonarqubecloud
Copy link
Copy Markdown

@roberth roberth changed the title Try fix schema_catalog_schema.json Fix schema_catalog_schema.json Jun 22, 2025
@roberth
Copy link
Copy Markdown
Author

roberth commented Jun 22, 2025

I hope you're all doing well.
I'd appreciate your input on the proposed fixes to the schema, and I'd like to confirm with you that a catalog field in the root is not part of the schema.

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.

1 participant