Commit 760eedf 1 parent 1702e52 commit 760eedf Copy full SHA for 760eedf
File tree 4 files changed +13
-8
lines changed
4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @unleash/proxy" ,
3
- "version" : " 0.16.2 " ,
3
+ "version" : " 0.16.3 " ,
4
4
"description" : " The Unleash Proxy (Open-Source)" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
38
38
},
39
39
"homepage" : " https://github.com/Unleash/unleash-proxy#readme" ,
40
40
"dependencies" : {
41
- "@unleash/express-openapi" : " ^0.2.1-beta .0" ,
41
+ "@unleash/express-openapi" : " ^0.3 .0" ,
42
42
"compression" : " ^1.7.4" ,
43
43
"cors" : " ^2.8.5" ,
44
44
"express" : " ^4.18.2" ,
Original file line number Diff line number Diff line change @@ -9,11 +9,13 @@ import { unleashContextSchema } from './spec/unleash-context-schema';
9
9
import { variantSchema } from './spec/variant-schema' ;
10
10
11
11
// Create the base OpenAPI schema, with everything except paths.
12
+
12
13
export const createOpenApiSchema = (
14
+ serverUrl ?: string ,
13
15
clientKeysHeaderName : string = 'Authorization' ,
14
16
) : Omit < OpenAPIV3 . Document , 'paths' > => ( {
15
17
openapi : '3.0.3' ,
16
- servers : [ ] ,
18
+ servers : serverUrl ? [ { url : serverUrl } ] : [ ] ,
17
19
info : {
18
20
title : 'Unleash Proxy API' ,
19
21
version : process . env . npm_package_version || '' ,
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ export class OpenApiService {
14
14
this . config = config ;
15
15
this . api = openapi (
16
16
this . docsPath ( ) ,
17
- createOpenApiSchema ( config . clientKeysHeaderName ) ,
17
+ createOpenApiSchema (
18
+ config . proxyBasePath ,
19
+ config . clientKeysHeaderName ,
20
+ ) ,
18
21
{ coerce : true } ,
19
22
) ;
20
23
}
Original file line number Diff line number Diff line change 1054
1054
" @typescript-eslint/types" " 5.22.0"
1055
1055
eslint-visitor-keys "^3.0.0"
1056
1056
1057
- " @unleash/express-openapi@^0.2.1-beta .0 " :
1058
- version "0.2.1-beta .0"
1059
- resolved "https://registry.yarnpkg.com/@unleash/express-openapi/-/express-openapi-0.2.1-beta. 0.tgz#1f5f43c6eb46c490990dc3e4709ab23a48a24e9a "
1060
- integrity sha512-72pNESnWyIvsLZaYjaBHwPXzO361up/A1tA/Mv+eG1MkntRJMNhRSgPzPvoP5j7pCxKeXqu1FRfXTXLRzGo+HA ==
1057
+ " @unleash/express-openapi@^0.3 .0 " :
1058
+ version "0.3 .0"
1059
+ resolved "https://registry.yarnpkg.com/@unleash/express-openapi/-/express-openapi-0.3. 0.tgz#3d65aeafc265732cf83c57b1d18452b5d0904856 "
1060
+ integrity sha512-rcbRNoL689knbemaTbL17FOb94hagr5T/vUUUZ1Fb107SGlBbOoQErf0tHlWpeCs6ffkM6uxo5BUnOAaf6CYDA ==
1061
1061
dependencies :
1062
1062
ajv "^6.10.2"
1063
1063
http-errors "^1.7.3"
You can’t perform that action at this time.
0 commit comments