Zum Inhalt springen
Skillpedia
APIs & Server (Backend)40k · #7313

openapi-to-application-code

Was er macht

Dieses Tool erstellt aus einer Datei, die eine API beschreibt (OpenAPI genannt), eine vollständige, sofort einsatzbereite Anwendung. Es versteht, wie die API funktionieren soll, und erzeugt den nötigen Code.

Wann du ihn nutzt

  • ✓Wenn du eine API-Beschreibung hast und eine Anwendung möchtest, die sie nutzt.
  • ✓Um schnell einen Prototyp einer Anwendung auf Basis einer bestehenden API zu erstellen.
  • ✓Wenn du ein neues Projekt startest und die Erstellung der grundlegenden Code-Struktur automatisieren willst.

Link zum Skill

https://github.com/github/awesome-copilot/blob/main/skills/openapi-to-application-code/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/github/awesome-copilot/blob/main/skills/openapi-to-application-code/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Erstelle eine Anwendung aus der OpenAPI-Spezifikation unter 'https://api.example.com/v2/openapi.json' mit dem Framework 'Spring Boot' und JWT-Authentifizierung.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Die KI liest die API-Beschreibung (OpenAPI) und versteht die Daten und verfügbaren Funktionen. Dann baut sie die Struktur der Anwendung auf, schreibt den Code für jeden Teil (etwa das Entgegennehmen von Anfragen, das Verarbeiten von Daten und das Antworten) und ergänzt Tests und Dokumentation.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Generate Application from OpenAPI Spec

Your goal is to generate a complete, working application from an OpenAPI specification using the active framework's conventions and best practices.

Input Requirements

  1. OpenAPI Specification: Provide either:

    • A URL to the OpenAPI spec (e.g., https://api.example.com/openapi.json)
    • A local file path to the OpenAPI spec
    • The full OpenAPI specification content pasted directly
  2. Project Details (if not in spec):

    • Project name and description
    • Target framework and version
    • Package/namespace naming conventions
    • Authentication method (if not specified in OpenAPI)

Generation Process

Step 1: Analyze the OpenAPI Specification

  • Validate the OpenAPI spec for completeness and correctness
  • Identify all endpoints, HTTP methods, request/response schemas
  • Extract authentication requirements and security schemes
  • Note data model relationships and constraints
  • Flag any ambiguities or incomplete definitions

Step 2: Design Application Architecture

  • Plan directory structure appropriate for the framework
  • Identify controller/handler grouping by resource or domain
  • Design service layer organization for business logic
  • Plan data models and entity relationships
  • Design configuration and initialization strategy

Step 3: Generate Application Code

  • Create project structure with build/package configuration files
  • Generate models/DTOs from OpenAPI schemas
  • Generate controllers/handlers with route mappings
  • Generate service layer with business logic
  • Generate repository/data access layer if applicable
  • Add error handling, validation, and logging
  • Generate configuration and startup code

Step 4: Add Supporting Files

  • Generate appropriate unit tests for services and controllers
  • Create README with setup and running instructions
  • Add .gitignore and environment configuration templates
  • Generate API documentation files
  • Create example requests/integration tests

Output Structure

The generated application will include:

project-name/
├── README.md                      # Setup and usage instructions
├── [build-config]                 # Framework-specific build files (pom.xml, build.gradle, package.json, etc.)
├── src/
│   ├── main/
│   │   ├── [language]/
│   │   │   ├── controllers/       # HTTP endpoint handlers
│   │   │   ├── services/          # Business logic
│   │   │   ├── models/            # Data models and DTOs
│   │   │   ├── repositories/      # Data access (if applicable)
│   │   │   └── config/            # Application configuration
│   │   └── resources/             # Configuration files
│   └── test/
│       ├── [language]/
│       │   ├── controllers/       # Controller tests
│       │   └── services/          # Service tests
│       └── resources/             # Test configuration
├── .gitignore
├── .env.example                   # Environment variables template
└── docker-compose.yml             # Optional: Docker setup (if applicable)

Best Practices Applied

  • Framework Conventions: Follows framework-specific naming, structure, and patterns
  • Separation of Concerns: Clear layers with controllers, services, and repositories
  • Error Handling: Comprehensive error handling with meaningful responses
  • Validation: Input validation and schema validation throughout
  • Logging: Structured logging for debugging and monitoring
  • Testing: Unit tests for services and controllers
  • Documentation: Inline code documentation and setup instructions
  • Security: Implements authentication/authorization from OpenAPI spec
  • Scalability: Design patterns support growth and maintenance

Next Steps

After generation:

  1. Review the generated code structure and make customizations as needed
  2. Install dependencies according to framework requirements
  3. Configure environment variables and database connections
  4. Run tests to verify generated code
  5. Start the development server
  6. Test endpoints using the provided examples

Questions to Ask if Needed

  • Should the application include database/ORM setup, or just in-memory/mock data?
  • Do you want Docker configuration for containerization?
  • Should authentication be JWT, OAuth2, API keys, or basic auth?
  • Do you need integration tests or just unit tests?
  • Any specific database technology preferences?
  • Should the API include pagination, filtering, and sorting examples?
Häufige Fragen

Was ist eine OpenAPI-Spezifikation?

Das ist eine Datei, die beschreibt, wie eine API funktioniert: welche Daten sie annimmt und zurückgibt und welche Aktionen sie ausführen kann.

Funktioniert die erzeugte Anwendung schon?

Ja, das Ziel ist eine vollständige und funktionsfähige Anwendung, die nur noch konfiguriert und gestartet werden muss.

Kann ich auswählen, welche Technik die Anwendung verwendet?

Ja, du kannst das gewünschte Framework und andere Technologien angeben, sofern sie nicht bereits in der API-Spezifikation festgelegt sind.

Details

Originalbeschreibung des Autors

Generate a complete, production-ready application from an OpenAPI specification

repo: github/awesome-copilot

Beliebtheit

GitHub-Sterne
40k
Platz im Ranking
#7313
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills