snok / drf-openapi-tester

Test utility for validating OpenAPI documentation
https://github.com/snok/django-openapi-tester
BSD 3-Clause "New" or "Revised" License
119 stars 23 forks source link

Support for path prefix #281

Closed petkostas closed 1 year ago

petkostas commented 2 years ago

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")
sondrelg commented 2 years ago

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 🙂

petkostas commented 2 years ago

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

sondrelg commented 1 year ago

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