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

"number_type" missing from the suggestions #17

Closed
celcius112 opened this issue Dec 10, 2020 · 4 comments
Closed

"number_type" missing from the suggestions #17

celcius112 opened this issue Dec 10, 2020 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@celcius112
Copy link
Collaborator

Hello, it seems like the number_type validator is missing from the suggestions in https://github.com/ekino/jcv-idea-plugin/blob/master/src/main/kotlin/com/ekino/oss/jcv/idea_plugin/suggestion/ValueToDefaultValidatorsSuggestion.kt.

I could provide a PR (it looks to be a trivial issue), but I heard in my oreillette that there are some big modifications incoming, so it might be better to wait for their merge before resolving this issue.

@leomillon
Copy link
Collaborator

Hello @celcius112

What do you mean by "is missing"? Because it is right there: https://github.com/ekino/jcv-idea-plugin/blob/master/src/main/kotlin/com/ekino/oss/jcv/idea_plugin/suggestion/ValueToDefaultValidatorsSuggestion.kt#L96

It is only suggested on JSON Number field values, so if you try this on a String literal value, you won't get it.

@leomillon leomillon added the question Further information is requested label Dec 10, 2020
@celcius112
Copy link
Collaborator Author

right sorry, I might be blind. however the suggestion still does not appear as expected, for instance:
Screenshot 2020-12-10 at 14 26 19
Screenshot 2020-12-10 at 14 26 30
Screenshot 2020-12-10 at 14 28 01

@leomillon
Copy link
Collaborator

Oh right good catch!

This is indeed missing but there: https://github.com/ekino/jcv-idea-plugin/blob/master/src/main/kotlin/com/ekino/oss/jcv/idea_plugin/definition/TemplatedValidator.kt#L70

You can create a quick PR if you want it before the complete rewrite of the plugin (I cannot provide any release date right now).

@leomillon leomillon added bug Something isn't working and removed question Further information is requested labels Dec 10, 2020
@leomillon
Copy link
Collaborator

leomillon commented Dec 10, 2020

Fixed and released in 2.0.1.

Waiting for JetBrains publication approval :)

@leomillon leomillon added this to the 2.0.1 milestone Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants