@@ -22,17 +22,15 @@ function run(urlStr, body, options) {
22
22
// See: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
23
23
fetch ( urlStr , opts )
24
24
. then ( res => {
25
- console . log ( )
26
25
const apiUrl = urlStr . replace ( / \/ $ / , '' )
27
26
url = new URL ( apiUrl ) ;
28
27
cfg = loadConfig ( url , cliOpts . config )
29
28
path = buildPath ( url , cliOpts . config )
30
29
31
- console . log ( `API Info:` )
32
- if ( cfg ?. [ "docs" ] !== undefined ) console . log ( ` Docs: ${ cfg ?. [ "docs" ] } ` )
33
- if ( path . path . pathFormat ) console . log ( ` Format: ${ path . path . pathFormat } ` )
34
- console . log ( ` Request: ${ opts . method } ${ url } ` )
35
- console . log ( ` Response: ${ res . status } ${ res . statusText } ` )
30
+ console . log ( `Status: ${ res . status } ${ res . statusText } ` )
31
+ console . log ( `Request: ${ opts . method } ${ url } ` )
32
+ if ( path . path . pathFormat ) console . log ( `Format: ${ path . path . pathFormat } ` )
33
+ if ( cfg ?. [ "docs" ] !== undefined ) console . log ( `Docs: ${ cfg ?. [ "docs" ] } ` )
36
34
37
35
comment = buildComment ( url , path , opts . method , res )
38
36
return res . json ( )
@@ -58,8 +56,8 @@ function write(json, path, content) {
58
56
} ) ;
59
57
console . log ( )
60
58
console . log ( "Generated Files:" )
61
- console . log ( ` Struct: ${ path . goFilePath } ` )
62
- console . log ( ` Payload: ${ path . jsonFilePath } ` )
59
+ console . log ( ` - ${ path . goFilePath } ` )
60
+ console . log ( ` - ${ path . jsonFilePath } ` )
63
61
}
64
62
65
63
function buildOpts ( body , cliOpts ) {
0 commit comments