-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add implementation for /convert
path
#13
Comments
/convert
/convert
path
Hi @magicmatatjahu 🙂, about this path is it related to the functionality of the converter-js? |
@BOLT04 Hi! Sorry for that late response but I had vacation in Christmas to the New Year :)
Yes, it's related to the |
@magicmatatjahu no problem, I hope you had a good time on your vacation 😃. // Note: Spec versions are defined in @asyncapi/specs
export enum SpecsEnum {
'1.0.0',
'1.1.0',
'1.2.0',
'2.0.0-rc1',
'2.0.0-rc2',
'2.0.0',
'2.1.0',
'2.2.0',
'latest'
}
export interface ConvertRequestDto {
version?: SpecsEnum;
language: 'json' | '',
asyncapi: AsyncAPIDocument
} Basically the request, The response could just be an object with the field Also, these TS types could be used on the project to have type-safety on the |
@BOLT04 I think that in the About YAML: Tbh I'm not expert in backend and that all staff with REST etc. but why we need that logic related to the YAML? As you wrote JSON doesn't support multiline but YAML can be sent with newline characters (
Good idea :)
Converted YAML should have proper indentation by
👌🏼 Please have in mind that the @smoya Do you wanna add something? |
ok awesome, thanks for all the input 👍 |
@magicmatatjahu could you help find where these errors are being thrown in |
Added the "yaml" package to convert JSON to YAML, since convert-js only seems to support YAML specs. If we don't want to support a JSON spec on the HTTP request, we can delete this dependency. If we do want that capability, then perhaps we should choose just one YAML package (yaml or js-yaml) that can do these conversions. asyncapi#13
@BOLT04 Heh 😅 , I had in mind
You're right but it's a |
Added the "yaml" package to convert JSON to YAML, since convert-js only seems to support YAML specs. If we don't want to support a JSON spec on the HTTP request, we can delete this dependency. If we do want that capability, then perhaps we should choose just one YAML package (yaml or js-yaml) that can do these conversions. asyncapi#13
🎉 This issue has been resolved in version 0.6.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
AC:
/convert
pathThe text was updated successfully, but these errors were encountered: