ฉันมีการตั้งค่าการรวม Swagger สำหรับจุดสิ้นสุดที่สร้างโดย Spring Data Rest ในโปรเจ็กต์ Spring Boot ต่อไปนี้เป็นการพึ่งพาที่เกี่ยวข้องที่ฉันมีในโครงการ:
compile "io.springfox:springfox-swagger2:2.6.1"
compile "io.springfox:springfox-swagger-ui:2.6.1"
compile "io.springfox:springfox-data-rest:2.6.1"
compile "io.springfox:springfox-bean-validators:2.6.1"
การตั้งค่าส่วนหัวใน Swagger สำหรับจุดสิ้นสุดเหล่านั้นจะแตกต่างกันไป ตัวอย่างเช่นฉันมี
curl -X GET --header 'Accept: application/x-spring-data-compact+json' 'http://localhost:8080/accounts'
โดยที่ประเภทการยอมรับหรือเนื้อหาในส่วนหัวควรเป็น application/json จะมีการตั้งค่าส่วนหัวที่ถูกต้องได้อย่างไร?
application/json
หรือapplication/x-spring-data-compact+json
ได้หรือไม่ - person Dilip Krishnan   schedule 03.04.2017