Closed joelittlejohn closed 1 year ago
Would it make sense to take some of the changes from https://github.com/joelittlejohn/jsonschema2pojo/pull/1464 in particular:
YamlRefIT
as it is empty (dead code)SelftRefIT::nestedSelfRefsInStringContentWithoutParentFile
such that it would act as an IT rather than unit test (schemaRule.generateAndCompile(...)
vs. new SchemaMapper().generate(...)
)|| ruleFactory.getGenerationConfig().getSourceType() == SourceType.YAML
to https://github.com/joelittlejohn/jsonschema2pojo/blob/65e1fdbcf4a4fd7298ea7ede0dc9c3e1651e9035/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/SchemaMapper.java#L127Or separate PR would be better ?
I've ticked off two of the above as part of this change.
When using JSON or YAML files (not schemas, but example data) the schemas will not have a proper file path in their ID, as there is no actual schema file. All schema IDs will be fragments only (relative references within the document). Once generation is complete for a file, these schemas should be thrown away and not reused.
Closes #1427