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

openapi-spec-generation

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

यह tool API documentation (ऐसे interfaces का विवरण, जिनसे programs एक-दूसरे से बात करते हैं) बनाने और व्यवस्थित करने में मदद करता है। यह documentation आपके code से या किसी पहले के design से बना सकता है।

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

  • ✓जब किसी नई API का documentation लिखना हो।
  • ✓जब आपके code में मौजूद API के लिए documentation बनाना हो।
  • ✓जब दूसरे programs के लिए आपकी API इस्तेमाल करने की guide बनानी हो।

Skill का लिंक

https://github.com/wshobson/agents/blob/main/plugins/documentation-generation/skills/openapi-spec-generation/SKILL.md

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

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

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

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

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

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

“उपयोगकर्ता का डेटा लेने वाली इस API के लिए OpenAPI documentation बनाओ।”

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

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

tool आपके code या design file का विश्लेषण करता है ताकि समझ सके कि आपकी API कैसे काम करती है। फिर वह एक standard file (OpenAPI 3.1) बनाता है, जो आपकी API की सारी जानकारी विस्तार से बताती है।

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

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

OpenAPI Spec Generation

Comprehensive patterns for creating, maintaining, and validating OpenAPI 3.1 specifications for RESTful APIs.

When to Use This Skill

  • Creating API documentation from scratch
  • Generating OpenAPI specs from existing code
  • Designing API contracts (design-first approach)
  • Validating API implementations against specs
  • Generating client SDKs from specs
  • Setting up API documentation portals

Core Concepts

1. OpenAPI 3.1 Structure

openapi: 3.1.0
info:
  title: API Title
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /resources:
    get: ...
components:
  schemas: ...
  securitySchemes: ...

2. Design Approaches

Approach Description Best For
Design-First Write spec before code New APIs, contracts
Code-First Generate spec from code Existing APIs
Hybrid Annotate code, generate spec Evolving APIs

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Use $ref - Reuse schemas, parameters, responses
  • Add examples - Real-world values help consumers
  • Document errors - All possible error codes
  • Version your API - In URL or header
  • Use semantic versioning - For spec changes

Don'ts

  • Don't use generic descriptions - Be specific
  • Don't skip security - Define all schemes
  • Don't forget nullable - Be explicit about null
  • Don't mix styles - Consistent naming throughout
  • Don't hardcode URLs - Use server variables
अक्सर पूछे जाने वाले सवाल

OpenAPI क्या है?

यह APIs का विवरण लिखने का standard format है। इसे एक नक्शे की तरह समझो, जो बताता है कि किसी online service का इस्तेमाल कैसे करें।

'Design-First' और 'Code-First' में क्या फ़र्क है?

'Design-First' में API बनाने से पहले नक्शा (documentation) बनाया जाता है। 'Code-First' में पहले API बनाई जाती है और फिर उसी से नक्शा तैयार किया जाता है।

'$ref' क्यों इस्तेमाल होता है?

यह एक shortcut की तरह है, जिससे एक ही जानकारी बार-बार लिखनी न पड़े। अगर किसी data type का विवरण एक जगह लिखा है, तो '$ref' से उसे दूसरी जगह भी इस्तेमाल किया जा सकता है।

जानकारी

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

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

repo: wshobson/agents

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

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