apple / apple/swift-openapi-generator
Support generating values of type URL from JSON Schema
- Dominant language
- Swift
- Stars
- 2k
- Forks
- 182
- Avg merge
- 13h 28m
- Merged PRs (30d)
- 5
Description
### Motivation
```
{
"time": "2023-12-06T20:45:17.385Z",
"url": "https://example.com"
}
```
For the above json data. The currently valid `openapi.yml` will use `string` to represent "time" and "url".
I'm hoping to somehow add support for URL and Date types directly on swift-openapi-generator.
### Proposed solution
1. Add a variant for OpenAPI 3.1 to allow "url" and "date" for type. (Not recommended)
2. ...
### Alternatives considered
None
### Additional information
_No response_
Contributor guide
Research direction
Start by reviewing how swift-openapi-generator maps OpenAPI 3.1 schemas to Swift types, focusing on the handling of string formats such as date and URL. The issue does not name files, tests, or a settled design; completion would require agreeing on the supported schema representation and validating generated Swift types for the example JSON values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100