You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some commands like asyncapi bundleasyncapi format the -o flag is written explicitly in flags file while in below 3 commands it is used from validationFlags() .
According to the code the output flag inside validationFlags() is responsible to write any diagnostics (if present) in file but the description of this flag is - 'The output file name. Omitting this flag the result will be printed in the console.' which might confuse user with other commands output flags.
asyncapi diff OLD NEW - In this command we have 2 flags with -o
-o, --output= The output file name. Omitting this flag the result will be printed in the console.
-o, --overrides= path to JSON file containing the override properties
Case 1 - Write only -o
It is assuming that I am trying to use --overrides
Case 2 - Provide --output as flag
It is printing correct output in logs but no file was created.
asyncapi validate [SPEC-FILE] [PROXYHOST] [PROXYPORT] -
In this command if we use -o flag than if their are any diagnostics than it will be printed in file otherwise file will be empty
Case 1 : Empty File
Case 2: If Diagnostics present than shown in output
So command is working fine but in documentation it is written:
-o, --output= The output file name. Omitting this flag the result will be printed in the console.
But about validation of file is still written in logs only because of logGovernanceMessage() in file src\core\parser.ts
asyncapi generate models LANGUAGE FILE
The usage of -o flag in this command is working absolutely fine a folder is created and which contains model file.
But this is created because of ModelinaFlags it also has output flag and was not created with help of validationFlags function.
Expected behavior
Solutions I am thinking to fix the issues -
I think we should change field output inside validationFlags to diagnosticsOutput and flag from -o to -o-diagnostics so user dont get confuse.
For asyncapi diff OLD NEW command we will have 3 flags -o-diagnostics for write diagnostics in file , -o for writing console print inside file and -O for override operation.
For asyncapi validate [SPEC-FILE] [PROXYHOST] [PROXYPORT] command the output print in console is simple and we don't require it to copy in file so this command will have only -o-diagnostics flag (which is currently present with -o).
For asyncapi generate models LANGUAGE FILE command -o is working correctly because of ModelinaFlags so if we just do above changes it will also have 2 different flags -o and -o-diagnostics.
Describe the bug.
In some commands like
asyncapi bundle
asyncapi format
the -o flag is written explicitly in flags file while in below 3 commands it is used fromvalidationFlags()
.According to the code the output flag inside
validationFlags()
is responsible to write any diagnostics (if present) in file but the description of this flag is - 'The output file name. Omitting this flag the result will be printed in the console.' which might confuse user with other commands output flags.asyncapi diff OLD NEW
- In this command we have 2 flags with -o-o, --output= The output file name. Omitting this flag the result will be printed in the console.
-o, --overrides= path to JSON file containing the override properties
Case 1 - Write only -o
It is assuming that I am trying to use --overrides
Case 2 - Provide --output as flag
It is printing correct output in logs but no file was created.
asyncapi validate [SPEC-FILE] [PROXYHOST] [PROXYPORT]
-In this command if we use -o flag than if their are any diagnostics than it will be printed in file otherwise file will be empty
Case 1 : Empty File
Case 2: If Diagnostics present than shown in output
So command is working fine but in documentation it is written:
-o, --output= The output file name. Omitting this flag the result will be printed in the console.
But about validation of file is still written in logs only because of
logGovernanceMessage()
in filesrc\core\parser.ts
asyncapi generate models LANGUAGE FILE
The usage of -o flag in this command is working absolutely fine a folder is created and which contains model file.
But this is created because of
ModelinaFlags
it also has output flag and was not created with help ofvalidationFlags
function.Expected behavior
Solutions I am thinking to fix the issues -
I think we should change field
output
insidevalidationFlags
todiagnosticsOutput
and flag from-o
to-o-diagnostics
so user dont get confuse.For
asyncapi diff OLD NEW
command we will have 3 flags-o-diagnostics
for write diagnostics in file ,-o
for writing console print inside file and-O
for override operation.For
asyncapi validate [SPEC-FILE] [PROXYHOST] [PROXYPORT]
command the output print in console is simple and we don't require it to copy in file so this command will have only-o-diagnostics
flag (which is currently present with-o
).For
asyncapi generate models LANGUAGE FILE
command -o is working correctly because ofModelinaFlags
so if we just do above changes it will also have 2 different flags-o
and-o-diagnostics
.Screenshots
Provided above.
How to Reproduce
Already mention above.
🥦 Browser
Google Chrome
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes
The text was updated successfully, but these errors were encountered: