mattpolzin / mattpolzin/OpenAPIKit
Allow $refs for vendor extensions
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Swift
- Stars
- 333
- Forks
- 49
- Avg merge
- 19h 9m
- Merged PRs (30d)
- 10
Description
Hi,
I could be wrong, but it looks like vendor extensions can only be resolved as AnyCodable dictionaries of [String: Any]. It would be great if we could use $refs in vendor extensions, i.e be able to do something like this:
openapi: 3.1.0
...
x-vendor-extension-cors: "#/components/schemas/cors"
...
components:
schemas:
cors:
allowedOrigins:
- "*"
allowedMethods:
- GET
- POST
- PUT
- OPTIONS
- PATCH
- DELETE
allowedHeaders:
- Accept
- Authorization
- Content-Type
- Origin
- X-Requested-With,
- Application-ID
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how vendor extensions are decoded and how $ref values are resolved in the Swift OpenAPI implementation. Use the YAML example in the issue as the behavior to investigate; done means vendor extensions can reference component schemas instead of being limited to AnyCodable dictionaries, with coverage for the example case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100