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

Pass schema to processCode #1194

Closed
awlayton opened this issue Apr 25, 2020 · 2 comments · Fixed by #1196
Closed

Pass schema to processCode #1194

awlayton opened this issue Apr 25, 2020 · 2 comments · Fixed by #1196

Comments

@awlayton
Copy link
Contributor

awlayton commented Apr 25, 2020

What version of Ajv you are you using?

6.12.0

What problem do you want to solve?

I am using the processCode option to instrument my generated code and it would be useful for my instrumentation to have access to information from my schemas.

What do you think is the correct solution to problem?

I think the schema should be passed as a second parameter to the processCode function.

Will you be able to implement it?

Yes.

@epoberezkin
Copy link
Member

epoberezkin commented Apr 25, 2020

It's ok - please do PR.
You may look at ajv-istanbul btw, I was experimenting with the code coverage there long time ago.

@awlayton
Copy link
Contributor Author

Yes I actually was looking at that, it was very useful as a starting point for me.

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

Successfully merging a pull request may close this issue.

2 participants