flasgger/flasgger
View on GitHubswag_from does not accept pathlib.Path objects as path specification
Open
#251 opened on Oct 9, 2018
enhancementhacktoberfesthelp wanted
Description
I think it would be nice if the swag_from decorator would accept pathlib.Path objects as this makes the paths os independent. Thus instead of:
@swag_from("swagger/version.yaml", endpoint='version')
def get(self):
....
I rather use:
@swag_from(Path("swagger/version.yaml"), endpoint='version')
def get(self):
....
I now have to wrap Path("swagger/version.yaml") into str()