मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)48k · #5377

openapi-spec-generator

यह क्या करती है

यह टूल एक तकनीकी दस्तावेज़ बनाता है (जिसे OpenAPI या Swagger specification कहते हैं) जो बताता है कि एक API (एक सर्विस जिसके ज़रिए सॉफ़्टवेयर आपस में बात करते हैं) कैसे काम करता है। यह यह दस्तावेज़ सामान्य भाषा में लिखे विवरण, code, या अधूरे दस्तावेज़ से बना सकता है।

कब इस्तेमाल करें

  • ✓जब आपको दूसरे developers के लिए किसी API का विवरण लिखना हो।
  • ✓जब किसी web service के लिए technical documentation बनाना हो।
  • ✓अगर आपके पास अपने API का draft पहले से है और उसे standard रूप में बदलना चाहते हैं।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/openapi-spec-generator/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/openapi-spec-generator/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“एक API के लिए OpenAPI specification बनाओ जो tasks को manage करे, जिसमें tasks की list देखने, नया task बनाने और task update करने के endpoints हों। YAML format में लिखो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI आपके विवरण या code का विश्लेषण करता है ताकि API की जानकारी समझ सके, जैसे वह कौन सा data इस्तेमाल करता है और कौन से काम कर सकता है। फिर वह OpenAPI या Swagger standards के हिसाब से एक पूरा तकनीकी दस्तावेज़ तैयार करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

OpenAPI / Swagger Specification Generator

When to Use

Use this skill when you need generate complete, production-ready OpenAPI 3.x and Swagger 2.0 specifications from natural language descriptions, code, or partial specs. Use this skill whenever the user mentions OpenAPI, Swagger, API spec, REST API documentation, YAML/JSON API schema, endpoint documentation, API...

Generate complete, valid OpenAPI 3.x or Swagger 2.0 specifications from descriptions, code, or partial specs.

Workflow

Step 1 — Gather Context

Before writing any YAML/JSON, ask (or infer from context) the following:

Question Why it matters
OpenAPI 3.x or Swagger 2.0? Different info, servers/host, components/definitions structure
Output format: YAML or JSON? YAML default unless user specifies JSON
What does this API do? Sets info.title, info.description, tags
List of endpoints (or code to extract from)? Core paths object
Authentication type(s)? securitySchemes — see reference
Common data models or entities? components/schemas / definitions
Any existing partial spec to extend? Merge rather than overwrite

If the user provides code (Express routes, FastAPI, Django URLs, Spring controllers, etc.), extract endpoints automatically — do not ask what the user already told you.

Step 2 — Build the Spec

Follow the structure guide for the chosen version. Always produce a complete, valid spec — never leave placeholder comments like # TODO: add schema.

OpenAPI 3.x Skeleton

openapi: "3.1.0"
info:
  title: <API Title>
  version: "1.0.0"
  description: <Short description>
  contact:
    name: <Team or Author>
    email: <contact@example.com>
servers:
  - url: https://api.example.com/v1
    description: Production
  - url: https://staging-api.example.com/v1
    description: Staging
tags:
  - name: <Tag>
    description: <Tag description>
paths:
  /resource:
    get:
      summary: List resources
      operationId: listResources
      tags: [<Tag>]
      parameters: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourceList"
              example:
                items: []
                total: 0
        "401":
          $ref: "#/components/responses/Unauthorized"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
        - BearerAuth: []
components:
  schemas: {}
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  securitySchemes: {}

Swagger 2.0 Skeleton

swagger: "2.0"
info:
  title: <API Title>
  version: "1.0.0"
  description: <Short description>
host: api.example.com
basePath: /v1
schemes: [https]
consumes: [application/json]
produces: [application/json]
tags: []
paths: {}
definitions: {}
securityDefinitions: {}

Step 3 — Schemas and Models

  • Always use $ref for any schema used in more than one place.
  • Include example or examples on every schema and response body.
  • Mark required fields with the required array.
  • Use nullable: true (OAS 3.0) or x-nullable: true (Swagger 2.0) for optional nullable fields.
  • Prefer format keywords: int32, int64, float, date, date-time, uuid, email, uri, byte, binary.

Common schema patterns:

# Pagination wrapper
PagedResult:
  type: object
  required: [items, total, page, pageSize]
  properties:
    items:
      type: array
      items:
        $ref: "#/components/schemas/Resource"
    total:
      type: integer
      format: int64
      example: 100
    page:
      type: integer
      format: int32
      example: 1
    pageSize:
      type: integer
      format: int32
      example: 20

# Standard error
Error:
  type: object
  required: [code, message]
  properties:
    code:
      type: string
      example: RESOURCE_NOT_FOUND
    message:
      type: string
      example: The requested resource was not found.
    details:
      type: object
      additionalProperties: true

# Timestamps mixin (use allOf)
Timestamps:
  type: object
  properties:
    createdAt:

…
अक्सर पूछे जाने वाले सवाल

OpenAPI/Swagger क्या हैं?

ये API का विवरण लिखने के standards हैं। इनसे web service कैसे काम करती है, यह दस्तावेज़ में साफ़ लिखा जाता है, जिससे अलग-अलग software को उसके साथ जोड़ना आसान होता है।

OpenAPI और Swagger में क्या अंतर है?

OpenAPI इस समय के standard का नाम है। Swagger एक लोकप्रिय tool है जो इस standard को लागू करता है, और यह पुराने versions के standard के लिए भी इस्तेमाल होता है।

क्या इसे इस्तेमाल करने के लिए coding आना ज़रूरी है?

ज़रूरी नहीं। आप API को सामान्य भाषा में बता सकते हैं और टूल उसे तकनीकी दस्तावेज़ में बदल देगा।

जानकारी

लेखक का मूल विवरण

Generate complete, production-ready OpenAPI 3.x and Swagger 2.0 specifications from natural language descriptions, code, or partial specs.

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#5377
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills