本文へ移動
cccskills
無料GitHub で公開

openapi-swagger-codegen-expert

OpenAPI 3.1 spec authoring, Swagger UI, automatic client/server code generation (openapi-typescript, Orval, Kiota), contract testing / Penulisan spesifikasi OpenAPI 3.1, Swagger UI, pembuatan kode klien/server otomatis, dan pengujian kontrak.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plugスター 115(GitHub 115 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

OpenAPI & Swagger Codegen Expert (Contract-First 2026)

English | Bahasa Indonesia


<a name="english"></a>

English

Orchestration & Integration

  • Upstream Specs & Design: api-design-expert, spec-driven-development-expert, prd-architect
  • Frontend Consuming: tanstack-query-expert, senior-frontend, form-validation-expert
  • Backend & Drifts: js-backend-expert, autonomous-api-drift-healer, api-gateway-proxy-expert
  • CI/CD Quality & Security: ci-cd-devops-architect, e2e-testing-expert, anti-slop
  • Lifecycle: zero-to-prod-orchestrator, session-memory-manager

Description

Dedicated expert guide for API contract-first development using OpenAPI 3.1 (with full JSON Schema 2020-12 alignment), interactive documentation (Scalar, Swagger UI, Redoc), and automated end-to-end client code generation. Covers generating strictly typed SDKs using openapi-typescript and openapi-fetch, creating automatic TanStack Query v5 hooks with Orval, scaffolding multi-language SDKs with Microsoft Kiota, and enforcing API design governance via Spectral in CI/CD pipelines.

Trigger Conditions

  • Scaffolding modern RESTful API contracts before writing server code (Phase 1/4).
  • Generating type-safe frontend API clients and TanStack Query hooks.
  • Configuring interactive API documentation with Scalar or Swagger UI.
  • Setting up automated contract testing with Prism or Pact.
  • Migrating manual, unvalidated fetch() calls to auto-generated typed clients.

Production OpenAPI 3.1 Specification Example

# specs/openapi.yaml
openapi: 3.1.0
info:
  title: Vibes Core Service API
  version: 1.0.0
  description: High-scale contract-first API with strict schema validation.
servers:
  - url: https://api.vibesplug.internal/v1
    description: Production Cluster
paths:
  /orders:
    post:
      operationId: createOrder
      summary: Place an atomic order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '201':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '400':
          $ref: '#/components/responses/ValidationError'

components:
  schemas:
    CreateOrderRequest:
      type: object
      required: [customerId, items, totalCents]
      properties:
        customerId:
          type: string
          format: uuid
        items:
          type: array
          items:
            type: object
            required: [productId, quantity]
            properties:
              productId: { type: string }
              quantity: { type: integer, minimum: 1 }
        totalCents:
          type: integer
          minimum: 1
    OrderResponse:
      type: object
      required: [id, status, createdAt]
      properties:
        id: { type: string, format: uuid }
        status: { type: string, enum: [PENDING, PAID, FULFILLED] }
        createdAt: { type: string, format: date-time }

Orval Configuration for TanStack Query v5

// orval.config.ts
import { defineConfig } from 'orval';

export default defineConfig({
  api: {
    input: './specs/openapi.yaml',
    output: {
      mode: 'tags-split',
      target: './src/api/generated/endpoints',
      schemas: './src/api/generated/models',
      client: 'react-query',
      httpClient: 'fetch',
      override: {
        query: {
          useQuery: true,
          useMutation: true,
          signal: true,
        },
        mutator: {
          path: './src/api/custom-fetch-instance.ts',
          name: 'customFetch',
        },
      },
    },
  },
});

Type-Safe Client Invocation (openapi-fetch)

// src/api/client.ts
import createClient from 'openapi-fetch';
import type { paths } from './generated/schema';

export const apiClient = createClient<paths>({ baseUrl: 'https://api.vibesplug.internal/v1' });

// Fully type-checked: parameters, request body, and responses are verified at compile-time
export async function submitOrder(customerId: string, productId: string, quantity: number, totalCents: number) {
  const { data, error } = await apiClient.POST('/orders', {
    body: { customerId, items: [{ productId, quantity }], totalCents }
  });
  if (error) throw new Error(`Order placement failed: ${error}`);
  return data; // Type: OrderResponse
}

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Integrasi Orkestrasi

  • Ideasi & Desain Spesifikasi: api-design-expert, spec-driven-development-expert, prd-architect
  • Konsumsi Frontend: tanstack-query-expert, senior-frontend, form-validation-expert
  • Backend & Drifts: js-backend-expert, autonomous-api-drift-healer, api-gateway-proxy-expert
  • Kualitas & Keamanan CI/CD: ci-cd-devops-architect, e2e-testing-expert, anti-slop
  • Siklus Hidup: zero-to-prod-orchestrator, session-memory-manager

Deskripsi

Panduan ahli khusus untuk pengembangan API dengan pendekatan contract-first menggunakan OpenAPI 3.1 (dengan dukungan penuh JSON Schema 2020-12), dokumentasi interaktif modern (Scalar, Swagger UI, Redoc), dan otomatisasi pembuatan klien SDK. Mencakup pembuatan SDK tipe ketat (strictly typed) menggunakan openapi-typescript dan openapi-fetch, pembuatan hooks TanStack Query v5 otomatis via Orval, scaffolding SDK multi-bahasa dengan Microsoft Kiota, serta penegakan standar desain API menggunakan Spectral pada pipeline CI/CD.

Kondisi Pemicu

  • Merancang spesifikasi API REST sebelum menulis kode backend (Fase 1/4).
  • Menghasilkan klien API frontend dan hooks React Query yang bebas kesalahan tipe secara otomatis.
  • Menyiapkan halaman dokumentasi API interaktif menggunakan Scalar atau Swagger UI.
  • Menguji keselarasan kontrak backend vs frontend menggunakan mock server (Prism).
  • Menggantikan pemanggilan fetch() manual tanpa tipe dengan klien otomatis yang terverifikasi.

Pola Integrasi Orval & React Query di Frontend

// Penggunaan hooks otomatis hasil generate Orval di komponen React 19
import { useCreateOrder } from '@/api/generated/endpoints/orders';

export function CheckoutButton({ customerId, productId, quantity, totalCents }: Props) {
  const { mutate, isPending } = useCreateOrder({
    mutation: {
      onSuccess: (order) => {
        console.log(`Pesanan berhasil dibuat: ${order.id}`);
      },
      onError: (err) => {
        console.error('Gagal membuat pesanan:', err);
      }
    }
  });

  return (
    <button 
      onClick={() => mutate({ data: { customerId, items: [{ productId, quantity }], totalCents } })}
      disabled={isPending}
      className="rounded-lg bg-emerald-600 px-4 py-2 font-medium text-white transition hover:bg-emerald-500"
    >
      {isPending ? 'Memproses...' : 'Bayar Sekarang'}
    </button>
  );
}

Validasi Spectral di Pipeline CI/CD

# .spectral.yaml
extends: ["spectral:oas"]
rules:
  operation-operationId-valid-in-url: error
  operation-description: warn
  no-eval-in-markdown: error

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

A2A agent protocol interoperability, Agent Cards, and MCP bridging / Protokol agen A2A, Agent Cards, dan integrasi MCP.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug1152026年10月27日 更新

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug1152026年10月27日 更新

Web accessibility testing with axe-core, Playwright, and WCAG 2.2 / Pengujian aksesibilitas web axe-core, Playwright, dan WCAG 2.2.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug1152026年10月27日 更新

Model cascading & complexity-scored routing (Grok, Gemini, Claude) / Routing kaskade model & scoring kompleksitas (Grok, Gemini, Claude).

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug1152026年10月27日 更新

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug1152026年10月27日 更新

Affective computing, emotion AI, and multimodal sentiment analysis / Komputasi afektif, AI emosional, dan analisis sentimen multimodal.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug1152026年10月27日 更新

roedyrustam のスキルをすべて見る

このスキルの問題を報告する