Skip to content

Support variable path components with a constant prefix/suffix #199

Closed
apple/swift-openapi-runtime
#47
@czechboy0

Description

@czechboy0

Support variable path components with a constant prefix/suffix.

For example, today we don't correctly bootstrap a server to handle GET /{version}.zip, because the RouterPathComponent (https://github.com/apple/swift-openapi-runtime/blob/cd8104a3e9ab07e0a0e077371ac4b785e41d2b5a/Sources/OpenAPIRuntime/Interface/CurrencyTypes.swift#L255) only has two cases: constant or parameter.

But to support a path like /{version}.zip or /foo-{bar} or /foo-{bar}-baz, we need a more flexible currency type for the path component.

This is blocking correctly generating a server for the Swift Package Registry API: https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#appendix-a---openapi-document

Metadata

Metadata

Assignees

Labels

area/runtimeAffects: the runtime library.kind/bugFeature doesn't work as expected.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions