1
안녕하세요. 내 RESTful 웹 서비스 문서화에 swagger를 사용하고 있습니다. json 문서 응답에서 객체의 특정 속성을 제거하는 방법이 있는지 알고 싶습니까? 내게 필요하지 않은 응답을 많이 읽을 수 없기 때문에 내 메소드 param 객체와 응답 모델 (예 : notes, defaultValue, allowableValue, internalDescription 등)에 대해 비틀 거리는 속성이 많다는 의미입니다.json 문서 응답에서 객체의 특정 속성을 제거합니다. REST API Swagger
방법 PARAMS 들어:
"parameters": [
{
"name": "someName1",
"description": null,
"notes": null,
"paramType": "path",
"defaultValue": null,
"allowableValues": null,
"required": true,
"allowMultiple": false,
"paramAccess": null,
"internalDescription": null,
"wrapperName": null,
"dataType": "string",
"valueTypeInternal": null
},
{
"name": "someName2",
"description": null,
"notes": null,
"paramType": "query",
"defaultValue": null,
"allowableValues": null,
"required": true,
"allowMultiple": false,
"paramAccess": null,
"internalDescription": null,
"wrapperName": null,
"dataType": "string",
"valueTypeInternal": null
}
],
- ==================================== =========================
응답 모델 클래스의 경우
"SomeResponseClass": {
"required": false,
"name": null,
"id": "SomeResponseClass",
"properties": {
"instanceVariable1": {
"required": false,
"name": null,
"id": null,
"properties": null,
"allowableValues": null,
"description": null,
"notes": null,
"access": null,
"default": null,
"additionalProperties": null,
"items": null,
"uniqueItems": false,
"type": "Date"
},
"instanceVariable2": {
"required": false,
"name": null,
"id": null,
"properties": null,
"allowableValues": null,
"description": null,
"notes": null,
"access": null,
"default": null,
"additionalProperties": null,
"items": null,
"uniqueItems": false,
"type": "double"
}
}