Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow json schema object as init parameter (TypeScript) #80

Closed
ghost opened this issue Jul 12, 2019 · 2 comments · Fixed by #96
Closed

Allow json schema object as init parameter (TypeScript) #80

ghost opened this issue Jul 12, 2019 · 2 comments · Fixed by #96

Comments

@ghost
Copy link

ghost commented Jul 12, 2019

Instead of a yaml file I only have a json swagger document object. When digging into the code I figured out that I can pass the document to the init method as follows:

swaggerValidator.init(document as any)

Is it possible to change the init signature (TypeScript) to allow objects as well?

@kobik
Copy link
Collaborator

kobik commented Sep 5, 2019

Hi @clemens-smartparking, thanks for your feedback!

This is an indeed requested feature so we'll try to find some time for it, but PRs are always welcome 🙂

@kobik
Copy link
Collaborator

kobik commented Sep 7, 2019

I've prepared a fix in PayU/api-schema-builder#35 which awaits for review, to finally handle this issue.

After it's merged and release, i'll update express-ajv-swagger-validation as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant