在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:victools/jsonschema-generator开源软件地址:https://github.com/victools/jsonschema-generator开源编程语言:Java 68.8%开源软件介绍:Java JSON Schema GeneratorCreating JSON Schema (Draft 6, Draft 7, Draft 2019-09 or Draft 2020-12) from your Java classes utilising Jackson. This project consists of:
Another example for such a module is:
DocumentationJavaDoc is being used throughout the codebase, offering contextual information in your respective IDE or being available online through services like javadoc.io. Additional documentation and configuration examples can be found here: https://victools.github.io/jsonschema-generator UsageDependency (Maven)<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
<version>4.25.0</version>
</dependency> Since version It is discouraged to use a older/lower CodeComplete/Minimal Exampleimport com.fasterxml.jackson.databind.JsonNode;
import com.github.victools.jsonschema.generator.OptionPreset;
import com.github.victools.jsonschema.generator.SchemaGenerator;
import com.github.victools.jsonschema.generator.SchemaGeneratorConfig;
import com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder;
import com.github.victools.jsonschema.generator.SchemaVersion; SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2019_09, OptionPreset.PLAIN_JSON);
SchemaGeneratorConfig config = configBuilder.build();
SchemaGenerator generator = new SchemaGenerator(config);
JsonNode jsonSchema = generator.generateSchema(YourClass.class);
System.out.println(jsonSchema.toPrettyString()); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论