개발자

OpenAPI 스펙

OpenAPI 3.1 형식의 기계 가독 API 정의. 클라이언트 생성, Postman 가져오기, 스키마 탐색에 사용하세요.

다운로드

📄
openapi.yaml
YAML 형식 — 42 KB. 사람이 읽기 쉽고 편집에 적합합니다.

YAML 다운로드
📋
openapi.json
JSON 형식 — 48 KB. 프로그래밍 방식 사용에 최적입니다.

JSON 다운로드

Postman으로 가져오기

  1. Postman을 열고 왼쪽 상단의 Import를 클릭하세요.
  2. openapi.yaml 파일을 끌어다 놓거나 URL을 붙여넣으세요: https://api.fs.ax/openapi.yaml
  3. Postman이 모든 엔드포인트, 파라미터, 예제 응답이 포함된 완전한 컬렉션을 생성합니다.
  4. Authorization 변수를 API 키로 설정하고 테스트를 시작하세요.

클라이언트 생성

OpenAPI Generator를 사용하여 50개 이상의 언어로 타입이 지정된 클라이언트를 생성하세요:

# Install the generator
npm install -g @openapitools/openapi-generator-cli

# Generate a TypeScript client
openapi-generator-cli generate \
  -i https://api.fs.ax/openapi.yaml \
  -g typescript-fetch \
  -o ./fsax-client

# Generate a Python client
openapi-generator-cli generate \
  -i https://api.fs.ax/openapi.yaml \
  -g python \
  -o ./fsax-python-client

# Generate a Go client
openapi-generator-cli generate \
  -i https://api.fs.ax/openapi.yaml \
  -g go \
  -o ./fsax-go-client

스펙 미리보기

스펙의 일부입니다:

openapi: "3.1.0"
info:
  title: fs.ax API
  version: "1.0.0"
  description: URL shortener with built-in monetization
  contact:
    email: api@fs.ax
servers:
  - url: https://api.fs.ax/v1
    description: Production
paths:
  /links:
    post:
      summary: Create a short link
      operationId: createLink
      tags: [Links]
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateLinkRequest"
      responses:
        "201":
          description: Link created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Link"
항상 최신 상태. 스펙은 Rust API 소스 코드에서 자동 생성되므로 항상 라이브 API와 정확히 일치합니다.

도움이 필요하신가요? API 문서를 확인하거나 api@fs.ax로 연락하세요.