File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class Endpoints extends Base {
63
63
64
64
const spec = this . components . spec . get ( ) ;
65
65
if ( ! spec ) {
66
- console . error ( 'Spec endpoint is not registered: openapi.json does not exist ' ) ;
66
+ console . log ( 'Spec endpoint is not registered: openapi.json is not loaded from filesystem ' ) ;
67
67
return ;
68
68
}
69
69
@@ -147,12 +147,12 @@ class Endpoints extends Base {
147
147
let spec = this . components . spec . get ( ) ;
148
148
const basePath = this . components . spec . basePath ( ) ;
149
149
if ( ! spec ) {
150
- console . error ( 'Could not generate app endpoints: openapi spec is not provided ' ) ;
150
+ console . log ( 'Could not generate app endpoints: openapi spec is not loaded from filesystem ' ) ;
151
151
return ;
152
152
}
153
153
154
154
if ( ! this . endpointsExist ( ) ) {
155
- console . error ( 'Could not generate app endpoints: openapi spec has no endpoints' ) ;
155
+ console . log ( 'Could not generate app endpoints: openapi spec has no endpoints' ) ;
156
156
return ;
157
157
}
158
158
@@ -269,6 +269,7 @@ class Endpoints extends Base {
269
269
. then ( ( ) => fn ( req , res ) )
270
270
. then ( ( ret ) => {
271
271
res . send ( ret ) ;
272
+ next ( ) ;
272
273
} )
273
274
. catch ( err => next ( err ) ) ;
274
275
} ;
Original file line number Diff line number Diff line change @@ -31,19 +31,19 @@ class Events extends Base {
31
31
32
32
publish ( ) {
33
33
if ( ! this . publishInterface ) {
34
- console . error ( 'Could not publish openapi refresh event: publish interface is not set' ) ;
34
+ console . log ( 'Could not publish openapi refresh event: publish interface is not set' ) ;
35
35
return Promise . resolve ( ) ;
36
36
}
37
37
38
38
const spec = this . components . spec . get ( ) ;
39
39
if ( ! spec ) {
40
- console . error ( 'Could not publish openapi refresh event: openapi spec file is is missing ' ) ;
40
+ console . log ( 'Could not publish openapi refresh event: openapi spec it not loaded from filesystem ' ) ;
41
41
return Promise . resolve ( ) ;
42
42
}
43
43
44
44
const serviceName = this . components . spec . serviceName ( ) ;
45
45
if ( ! serviceName ) {
46
- console . error ( 'Could not publish openapi refresh event: service name is not specified' ) ;
46
+ console . log ( 'Could not publish openapi refresh event: service name is not specified' ) ;
47
47
return Promise . resolve ( ) ;
48
48
}
49
49
@@ -53,12 +53,12 @@ class Events extends Base {
53
53
54
54
subscribe ( ) {
55
55
if ( ! this . publishInterface ) {
56
- console . error ( 'Could not subscribe openapi refresh event: subscribe interface is not set' ) ;
56
+ console . log ( 'Could not subscribe openapi refresh event: subscribe interface is not set' ) ;
57
57
return ;
58
58
}
59
59
const services = this . components . services . all ( ) ;
60
60
if ( _ . isEmpty ( services ) ) {
61
- console . error ( 'Listener not registered for openapi refresh event: no dependencies inside openapi spec file' ) ;
61
+ console . log ( 'Listener not registered for openapi refresh event: no dependencies inside openapi spec file' ) ;
62
62
return ;
63
63
}
64
64
Original file line number Diff line number Diff line change @@ -68,12 +68,12 @@ class SpecProvider extends Base {
68
68
69
69
validate ( ) {
70
70
if ( ! this . exposedSpec ) {
71
- console . error ( 'Could not validate openapi spec: spec is not loaded' ) ;
71
+ console . log ( 'Could not validate openapi spec: spec is not loaded from filesystem ' ) ;
72
72
return ;
73
73
}
74
74
const serviceName = this . serviceName ( ) ;
75
75
if ( ! serviceName ) {
76
- console . error ( `Property "x-service-name" is not specified inside the spec: ${ this . filename ( ) } ` ) ;
76
+ console . log ( `Property "x-service-name" is not specified inside the spec: ${ this . filename ( ) } ` ) ;
77
77
}
78
78
}
79
79
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @codefresh-io/cf-openapi" ,
3
- "version" : " 0.2.3 " ,
3
+ "version" : " 0.2.4 " ,
4
4
"scripts" : {
5
5
"test" : " jest --runInBand" ,
6
6
"eslint" : " eslint lib/**" ,
You can’t perform that action at this time.
0 commit comments