openapi-to-application-code

软件研发 后端与 API 1 文件 EN 原文

'Generate a complete, production-ready applicati

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

说明语言:英文

来源githubawesome-copilot ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/github/awesome-copilot --skill openapi-to-application-code

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: openapi-to-application-code description: 'Generate a complete, production-ready application from an OpenAPI specification' ---

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:
  2. A URL to the OpenAPI spec (e.g., https://api.example.com/openapi.json)
  3. A local file path to the OpenAPI spec
  4. The full OpenAPI specification content pasted directly
  1. Project Details (if not in spec):
  2. Project name and description
  3. Target framework and version
  4. Package/namespace naming conventions
  5. Authentication method (if not specified in OpenAPI)

Generation Process

Step 1: Analyze the OpenAPI Specification

Step 2: Design Application Architecture

Step 3: Generate Application Code

Step 4: Add Supporting Files

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

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

同类技能
api-design-principlescopilot-sdkcreate-spring-boot-java-projectcreate-spring-boot-kotlin-projectdotnet-backend-patternsdotnet-best-practicesdotnet-timezonedotnet-upgrade
本页内容来自开源项目 github, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。