CycloneDX / CycloneDX/cyclonedx-core-java
validate method should read schema version from the file
- Lingua principale
- Java
- Stelle
- 120
- Fork
- 90
- Merge medio
- 12h 43m
- PR unite (30g)
- 18
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Confronta il metodo parse esistente con i punti di ingresso isValid e validate, quindi esamina il metodo privato che legge la versione dello schema dal file sorgente. Fai in modo che il percorso di validazione utilizzi la versione rilevata quando non viene fornita alcuna versione e verifica che la validazione XML xmlns utilizzi la versione dello schema del file sorgente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100