Skip to content

Commit 0e16394

Browse files
authored
Merge pull request #1231 from finos/make-auth-config-schema-more-intuitive
fix: rename definitions/authentication in schema to make it more inutitive
2 parents f23f801 + e264c19 commit 0e16394

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

config.schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"description": "List of authentication sources. The first source in the configuration with enabled=true will be used.",
119119
"type": "array",
120120
"items": {
121-
"$ref": "#/definitions/authentication"
121+
"$ref": "#/definitions/authenticationElement"
122122
}
123123
},
124124
"tempPassword": {
@@ -136,7 +136,7 @@
136136
"description": "List of authentication sources for API endpoints. May be empty, in which case all endpoints are public.",
137137
"type": "array",
138138
"items": {
139-
"$ref": "#/definitions/authentication"
139+
"$ref": "#/definitions/authenticationElement"
140140
}
141141
},
142142
"tls": {
@@ -206,7 +206,7 @@
206206
},
207207
"required": ["type", "enabled"]
208208
},
209-
"authentication": {
209+
"authenticationElement": {
210210
"type": "object",
211211
"description": "Configuration for an authentication source",
212212
"oneOf": [

src/config/generated/config.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface GitProxyConfig {
2121
* List of authentication sources for API endpoints. May be empty, in which case all
2222
* endpoints are public.
2323
*/
24-
apiAuthentication?: Authentication[];
24+
apiAuthentication?: AuthenticationElement[];
2525
/**
2626
* Customisable questions to add to attestation form
2727
*/
@@ -30,7 +30,7 @@ export interface GitProxyConfig {
3030
* List of authentication sources. The first source in the configuration with enabled=true
3131
* will be used.
3232
*/
33-
authentication?: Authentication[];
33+
authentication?: AuthenticationElement[];
3434
/**
3535
* List of repositories that are authorised to be pushed to through the proxy.
3636
*/
@@ -145,7 +145,7 @@ export interface Ls {
145145
/**
146146
* Configuration for an authentication source
147147
*/
148-
export interface Authentication {
148+
export interface AuthenticationElement {
149149
enabled: boolean;
150150
type: Type;
151151
/**
@@ -501,10 +501,14 @@ const typeMap: any = {
501501
{
502502
json: 'apiAuthentication',
503503
js: 'apiAuthentication',
504-
typ: u(undefined, a(r('Authentication'))),
504+
typ: u(undefined, a(r('AuthenticationElement'))),
505505
},
506506
{ json: 'attestationConfig', js: 'attestationConfig', typ: u(undefined, m('any')) },
507-
{ json: 'authentication', js: 'authentication', typ: u(undefined, a(r('Authentication'))) },
507+
{
508+
json: 'authentication',
509+
js: 'authentication',
510+
typ: u(undefined, a(r('AuthenticationElement'))),
511+
},
508512
{ json: 'authorisedList', js: 'authorisedList', typ: u(undefined, a(r('AuthorisedRepo'))) },
509513
{ json: 'commitConfig', js: 'commitConfig', typ: u(undefined, m('any')) },
510514
{ json: 'configurationSources', js: 'configurationSources', typ: u(undefined, 'any') },
@@ -536,7 +540,7 @@ const typeMap: any = {
536540
),
537541
Github: o([{ json: 'baseUrl', js: 'baseUrl', typ: u(undefined, '') }], 'any'),
538542
Ls: o([{ json: 'userInADGroup', js: 'userInADGroup', typ: u(undefined, '') }], 'any'),
539-
Authentication: o(
543+
AuthenticationElement: o(
540544
[
541545
{ json: 'enabled', js: 'enabled', typ: true },
542546
{ json: 'type', js: 'type', typ: r('Type') },

0 commit comments

Comments
 (0)