Ecossistema

OpenAPI

Descrição machine-readable da API v1 para gerar SDKs, mocks e documentação alternativa.

Escopo

  • GET /api/v1/health
  • POST /api/v1/payments
  • GET /api/v1/payments
  • GET /api/v1/payments/{id}
  • DELETE /api/v1/payments/{id}
Enquanto o YAML oficial não está publicado no CDN, use a referência e o snippet abaixo como base.

Snippet mínimo

openapi: 3.0.3
info:
  title: HyzePay API
  version: v1
servers:
  - url: https://hyzepay.pro
paths:
  /api/v1/health:
    get:
      summary: Health
      responses:
        "200":
          description: OK
  /api/v1/payments:
    post:
      summary: Criar pagamento PIX
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePayment"
      responses:
        "201":
          description: Created
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    CreatePayment:
      type: object
      properties:
        amount_cents: { type: integer }
        description: { type: string }
        external_id: { type: string }

Gerar clients

# exemplo com openapi-generator
openapi-generator-cli generate \
  -i openapi-hyzepay-v1.yaml \
  -g typescript-fetch \
  -o ./generated/hyzepay