Skip to content

Spring Doc

having-dlrow edited this page May 2, 2024 · 2 revisions

Swagger API

Spring doc, Spring fox 두 라이브러리 모두 Spring framework 사용하여, Swagger API 문서를 쉽게 사용하도록 하는 라이브러리 이다.

Spring Doc ✅

  • API Grouping 가능하다.
  • OpenAPI 3.0 스펙에 맞는 JSON을 만들어준다.

구성요소

  • swagger-ui : 핵심 로직
  • springdoc-openapi : swagger-ui 추상화하여 활용성을 넓히는 라이브러리

application.yaml

springdoc:
    default-produces-media-type: application/json;charset=UTF-8
    default-consumes-media-type: application/json;charset=UTF-8
    swagger-ui:
        path: /api-docs.html
        operations-sorter: method

    api-docs:
        path: /api-docs
Clone this wiki locally