RoadieHQ / backstage-entity-validator

Validate properties and well known annotations in your Backstage catalog-info.yaml files.
https://roadie.io
68 stars 14 forks source link

Possible unnecessary entry in schema #21

Closed davidgiesberg closed 2 years ago

davidgiesberg commented 2 years ago

This is new to me, so it is possible that I have misunderstood something, but I believe that this line should not be here: https://github.com/RoadieHQ/backstage-entity-validator/blob/68841ee4a3cbb89ca54c58300ab55dc2807fd275/src/schemas/annotations.schema.json#L16

I've been seeing this error when I run this validator:

strict mode: missing type "array" for keyword "uniqueItems" at "Entity metadata annotations#/properties/metadata/properties/annotations" (strictTypes)

Based on my read of the json schema spec, uniqueItems should only be present for array types, not objects - relevant doc

roadie-bot commented 2 years ago

https://app.shortcut.com/larder/story/4445

Xantier commented 2 years ago

Thanks @davidgiesberg,

That indeed seems to be the case. It produces a warning message according to my tests with this but we should probably just remove it. Would you be able to create a PR for this?

rmg commented 2 years ago

There doesn't appear to be a repo to contribute this to after #26 removed the schema file. The library doesn't seem to have a repo, or at least not one that is public and easy to guess.

Xantier commented 2 years ago

Thanks @rmg, the library itself has been moved to the roadie-backstage-plugins monorepo. You can find this particular codebase from here: https://github.com/RoadieHQ/roadie-backstage-plugins/tree/main/utils/roadie-backstage-entity-validator.

This repository is just a wrapper to be able to ship CircleCI and GHA essentially out of that lib.

rmg commented 2 years ago

Ah. I suspected it might have been in a monorepo somewhere, but when I looked at that one and I saw the layout inside packages/ and plugins/ was typical backstage layout and not a basic node package monorepo, I moved on 🤦🏻‍♀️

kissmikijr commented 2 years ago

Released a new version (0.3.8) which contains fixes for this issue: https://www.npmjs.com/package/@roadiehq/backstage-entity-validator

I'm gonna close this issue,