-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Azure schema registry does not work if schema JSON contains newlines #15131
Comments
@dhoepelman Thanks again for the feedback. I will take a look. I believe this is a response from the service judging from the 400 in the thrown error. Agree this is totally unexpected either way. I'll confirm if it's the service behaving this way and forward the feedback along to the service owners if so. If not, I'll fix it on our side. :) |
Heads up, @hmlam, I'll let you know what I find, but maybe you've seen something like this already? |
It's not on the server side, because replicating the underlying call with curl works fine if the schema contains newlines curl --location --request PUT 'https://<my schema registry>.servicebus.windows.net/$schemagroups/<my-schema-group>/schemas/Test?api-version=2017-04' \
--header 'Authorization: Bearer <portal.azure.com token>' \
--header 'x-schema-type: avro' \
--header 'Serialization-Type: avro' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "record",
"name": "Test",
"fields": [{ "name": "X", "type": { "type": "string" } }]
}
' |
OK, interesting and surprising, I'll dig in. Thank you for the added detail |
So far, I haven't managed to reproduce this. When I registered the schema using code above, it succeeded. |
I'm going to retry with 1.0.0.beta.1, maybe this was fixed since. |
Yep, something fixed this between 1.0.0-beta.1 and now! 😁 I'm fairly convinced it was #11650. There had been some issues with the swagger and autorest around the body being a raw string. Also, there really hasn't been any other interesting changes since beta 1.
|
Ah ok, npm registry lists 1.0.0-beta.1 as the latest version. Is there any planning to release a new version? |
Yes, we'll try to push a release. I'll update here when I have an ETA. |
Azure resource 2021 7 (Azure#15131) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <[email protected]>
Azure resource 2021 7 (Azure#15131) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <[email protected]>
Azure resource 2021 7 (Azure#15131) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <[email protected]>
Azure resource 2021 7 (Azure#15131) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <[email protected]>
Azure resource 2021 7 (Azure#15131) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <[email protected]>
Azure resource 2021 7 (Azure#15131) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * readme.python config Co-authored-by: msyyc <[email protected]>
@dhoepelman Hi, @nguerrera fixed this issue and is scheduled to be part of the v1.0.0-beta.2 happening this month. For now, could you please try this alpha version? |
@dhoepelman please find the official release out here: https://www.npmjs.com/package/@azure/schema-registry/v/1.0.0-beta.2. |
Hi @dhoepelman. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
Hi @dhoepelman, since you haven’t asked that we “ |
Describe the bug
The azure schema registry does not function if the schema
content
contains newlinesTo Reproduce
Steps to reproduce the behavior:
1.
or
Expected behavior
Schema newlines (and whitespace) should not affect the API, as long as it results in the equivalent JSON
At the very minimum, this should have some major warnings in the SDK docs and typings
The text was updated successfully, but these errors were encountered: