drf-openapi-tester icon indicating copy to clipboard operation
drf-openapi-tester copied to clipboard

Support for path prefix

Open petkostas opened this issue 2 years ago • 2 comments

Our API prefix is included in the server part of the OAS files to remove repetition from endpoints. It would be nice to support specifying the prefix while initializing the schema tester:

from openapi_tester import SchemaTester

schema_tester = SchemaTester(schema_file_path="./openapi.yaml", prefix="/api/v2")

petkostas avatar Oct 10 '22 14:10 petkostas

I think this sounds like a good idea without any real drawbacks. If you want to open a PR adding this feature, I would be happy to accept it 🙂

sondrelg avatar Oct 10 '22 23:10 sondrelg

@sondrelg, thanks for the fast response! I will do so

petkostas avatar Oct 11 '22 07:10 petkostas

I will close this in the meantime :+1: Ping me when the PR is ready and I'll review :slightly_smiling_face:

sondrelg avatar Nov 26 '22 12:11 sondrelg