apple / apple/swift-openapi-generator
Introduce an "init" subcommand for bootstrapping a package
- Dominant language
- Swift
- Stars
- 2k
- Forks
- 182
- Avg merge
- 13h 28m
- Merged PRs (30d)
- 5
Description
Introduce an "init" subcommand for bootstrapping a package.
At the very least, should bootstrap (decision: client vs server, asked by the CLI):
- Package.swift
- a new Hello World-like OpenAPI document (or an existing one can be provided by the user in the command)
- main.swift/Tool.swift with the entry point and basic code to get things working with `swift run`
- config file with reasonable defaults
For example: `swift-openapi-generator init-package --mode client` would create a new package, with a simple OpenAPI doc, and the generator configured etc. This package would work out of the box with `swift run`. Just need two variants: client and server.
Contributor guide
Research direction
Start by tracing the existing CLI subcommand handling and package configuration, then compare the requested client and server outputs. Done means an init-package command creates Package.swift, a Hello World-like OpenAPI document, main.swift or Tool.swift, and a config file, with the generated package working under swift run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, swift
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100