openapi.yaml:
servers:
- url: /v
paths:
/version:
get:
...
pyramid config:
config.add_route("version", "/version")
(along with this config to deal with the prefix on the server)
[filter:paste_prefix]
use = egg:PasteDeploy#prefix
prefix = /v
This code
|
def remove_prefixes(path): |
|
path = f"/{path}" if not path.startswith("/") else path |
|
for prefix in prefixes: |
|
if path.startswith(prefix): |
|
prefix_length = len(prefix) |
|
return path[prefix_length:] |
|
return path |
Will remove the /v from /version and then complain that route "/version" is missing even though it is clearly present in the code. Are prefixes ever part of the route that they need to be removed?
openapi.yaml:
pyramid config:
(along with this config to deal with the prefix on the server)
This code
pyramid_openapi3/pyramid_openapi3/__init__.py
Lines 371 to 377 in 2904c34
Will remove the
/vfrom/versionand then complain that route "/version" is missing even though it is clearly present in the code. Are prefixes ever part of the route that they need to be removed?