-
Notifications
You must be signed in to change notification settings - Fork 241
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
Incorrect data-type errors for valid response examples #429
Comments
Thanks for the bug report. @VitaliyKurokhtin has a PR #431 that will fix this. |
Hi @darrelmiller , is there any eta when 1.2.0 is going to be released? I am also having this issue with my examples when importing into the UI. |
That would be great! Thanks. |
I am also getting this when trying to import an open api 3.0.1 into the Azure API Management portal. Can I get an ETA on this? Over 3 months now and the impact quite large. |
same on our side - we had to change lots of exampleprovider just to make it work. all those example provider now showing grammatically wrong data. thanks! |
Good find. The date parse breaks for me but used to work a few weeks ago. How did this get into production if the test is failing? |
I have removed the example data validation from the default set of validators in 1.2.0. This is not validation can be done during parsing and is not required by the specification. It was also a mistake to try and strongly type the examples during parsing. I'm not sure how we are going to fix in this in a non-breaking way. |
Guys I am trying to update an API that is in Azure API management that I previously deployed a few weeks ago. Now I am getting the incorrect data-type error for date examples when importing an updated api definition. Some of which are mandatory fields. The api definition passes validation in Swaggerhub fine. Now I have to demo the api to a client in 2 days using the Azure API developer portal but the API definitions are old and I can't update them. So I am asking for an Eta for a fix. The client keeps asking if we can move to AWS. Might have to look seriously at doing that if this isn't working soon. |
@Robzilla, technically this is not the place to discuss APIM issues. Feel free to open support ticket with description if the issue, there've been a couple of known ones for which general resolution is pending but we can speed things up for your service. |
Seriously, the API M guys say talk to the Open API guys and the Open API guys say talk to the API M guys. Regressing functionality in a major product offering seriously degrades confidence in MS. Can anyone offer an Eta on a fix. This functionality used to work. Just roll back the broken build. |
@Robzilla VitaliyK is an APIM guy :-) I believe APIM is currently working off a forked build of OpenAPI.NET so that they are not blocked by my slow release process. I did a bunch of testing on 1.2.0 on the weekend and there are still some bugs I need to fix before we can come out of preview. That will remove the data validations by default. |
@Robzilla, Really not sure why would anyone direct you to OpenAPI.NET, no matter where the issue is - APIM or OpenAPI.NET - it's not like you can fix it in either place. Event if you make a fix to OpenAPI.NET yourself you can't integrate it into APIM. So that definitely wasn't fair. As it always goes with these things, this issue only affects some of our customers, so we're doing retakes on service by service basis. Another APIM release is ongoing right now with this fix and other changes, ETA for when it reaches your service varies depending on its region, at most it may take a week if all goes well. But if you share your service name I'll be able to apply fix almost immediately. If you're not comfortable sharing it here, please, do open a support ticket it'll reach us and I'll apply the fix. |
@VitaliyKurokhtin here is the link from the issue in the API Management Portal thread where the issue was first reported (to my knowledge) last November. @DrReedo advises to raise the issue here. |
Reporting issue originally to api-management-developer-portal portal was the right move on your side, since you being outside of the product cannot know whether the issue is in portal or on APIM server side. Once issue was identified to be not in portal asking you to direct it here was incorrect in my opinion. The bug is indeed in OpenAPI.NET and APIM uses this library to facilitate OpenAPI import. But as I said above it's not like you or anyone maintaining OpenAPI.NET can affect what is being done inside APIM. The best they can do is communicate issue to us just because we happen to know each other. So the best way to raise any issues with any Microsoft maintained service is to open a support ticket. |
@VitaliyKurokhtin |
@Robzilla, fix should reach Australia East as a part of next update next week. |
Any updates on this issue? Not able to add APIs to Azure now. |
The 1.2 release will be able to validate an example in the Schema object, but it will not be able to validate the example in the media type object. Users should no longer see failures due to incorrect validation logic in the 1.2 release. |
I am having the same issue - a valid (tested elsewhere), autogenerated. openAPI3 spec is being rejected by Azure. |
Errors are thrown if a response example is given for a string property defined in a schema that also happens to parse as a number.
The following produces the error
Data and type mismatch found. [#/paths/~1test/get/responses/200/content/application~1json/example/BrokenProperty]
The text was updated successfully, but these errors were encountered: