Posts API 스펙을 제공할 때 생각해볼 것들
Post
Cancel

API 스펙을 제공할 때 생각해볼 것들

  • 특정 API를 사용하려면 어떤 파라미터로 요청해야하는지, 주의사항은 있는지 등이 필요하다. 설명서 같은 것.

스펙 작성시 필요하다고 생각하는 것

  • API 정의
  • 요청 파라미터
    • 필수 여부
    • 데이터 타입
    • 제약사항
    • default 값
  • 응답 파라미터
    • 필수 여부
    • 응답 상황별 어떻게 달라지는지 (응답 코드 등)
      • 정상 상황
      • 예외 상황

실제 사례 살펴보기

=> https://toss.tech/article/tosspayments-restdocs => https://tech.kakaopay.com/post/openapi-documentation/ => https://helloworld.kurly.com/blog/spring-rest-docs-guide/

This post is licensed under CC BY 4.0 by the author.

Swagger 훑어보기

Hello Restdocs