CycloneDX / CycloneDX/cyclonedx-core-java
validate method should read schema version from the file
- Vorherrschende Sprache
- Java
- Sterne
- 120
- Forks
- 90
- Ø Merge
- 12 Std. 43 Min.
- Gemergte PRs (30 T.)
- 18
Beschreibung
In the `parse` method, it does read the schema version from the source file which is working fine. But when users call the `isValid` or `validate` method without specify a schema version it always use latest version as default. This does not work for the case of XML since the xmlns in the source file does not match with the one in the latest version.
In library we have a method to get the schema version from the source file but this method is private and cannot be used by the users. It means in order to get correct version, users need to check themselves before hand.
I suggest we should read schema version automatically as we do with the `parse` method.
Beitragsleitfaden
Rechercherichtung
Vergleiche die vorhandene parse-Methode mit den Einstiegspunkten isValid und validate und untersuche anschließend die private Methode, die die Schema-Version aus der Quelldatei liest. Sorge dafür, dass der Validierungspfad diese erkannte Version verwendet, wenn keine Version angegeben ist, und überprüfe, dass die XML-xmlns-Validierung die Schema-Version der Quelldatei verwendet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100