"jsonschema2pojo"프로젝트에는이 목적을위한 표기법이 포함되어 있습니다.
JSON 스키마에는 다음과 같은 내용이 포함됩니다.
"extendsJavaClass" : "com.somecompany.SomeBaseClass",
즉
{
"title": "....",
"description": "....",
"type": "object",
"extendsJavaClass" : "com.somecompany.SomeBaseClass",
"properties": {
"...": {
"items": {
"$ref": "#/definitions/...."
},
"type": "array"
}
.......
}
다음 프로젝트에 의해 생성 된 클래스의 것 같은 절 "는 연장";
/**
* ...
* <p>
* ...
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
...
})
public class MyNewClass
extends SomeBaseClass
{
...
}
here에서 유사한 표기법을 검색 할 수도 있습니다.
추신 : Theese 표기법은 "표준 JSON 스키마 구조"가 아닙니다. 그들은 표준 방법이 가능할 때까지 "just doing it"을 위해 추가됩니다.
희망 하시겠습니까?
짧은에. 'allOf' 내부의 스키마 등은 서로를 알지 못하며 객체 지향적 인 의미에서 "확장"될 수 없습니다. https://spacetelescope.github.io/understanding-json-schema/reference/combining.html – chharvey