Skip to content

Commit 86be3d7

Browse files
inline list items with otherAttributeInfo (#2777)
* inline list items with otherAttributeInfo * update examples
1 parent fb689a3 commit 86be3d7

11 files changed

Lines changed: 33 additions & 46 deletions

File tree

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,9 @@ api:
959959
consentFile: consentFile.json
960960
staticUserDataProvider:
961961
users:
962-
- user:
963-
username: john
964-
password: secret
965-
email: john@predic8.de
962+
- username: john
963+
password: secret
964+
email: john@predic8.de
966965
staticClientList:
967966
clients:
968967
- clientId: abc
@@ -992,12 +991,10 @@ api:
992991
flow:
993992
- basicAuthentication:
994993
users:
995-
- user:
996-
username: alice
997-
password: secret
998-
- user:
999-
username: bob
1000-
password: secret
994+
- username: alice
995+
password: secret
996+
- username: bob
997+
password: secret
1001998
target:
1002999
url: https://api.predic8.de
10031000
```

annot/src/main/java/com/predic8/membrane/annot/generator/JsonSchemaGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ private boolean shouldInlineListItems(MainInfo main, ChildElementInfo cei) {
499499

500500
if (ei.getAnnotation().collapsed()) return false;
501501
if (ei.getAnnotation().noEnvelope()) return false;
502-
if (ei.isString()) return false;
503502

504503
return hasAnyConfigurableProperty(ei, main);
505504
}
@@ -525,6 +524,7 @@ private boolean hasAnyConfigurableProperty(ElementInfo ei, MainInfo main) {
525524
.anyMatch(ai -> !"id".equals(ai.getXMLName()))
526525
|| ei.getTci() != null
527526
|| !ei.getChildElementSpecs().isEmpty()
527+
|| ei.getOai() != null
528528
|| hasComponentChild(ei, main);
529529
}
530530

distribution/examples/security/basic-auth/simple/apis.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ api:
44
flow:
55
- basicAuthentication:
66
users:
7-
- user:
8-
username: alice
9-
password: membrane
10-
- user:
11-
username: bob
12-
password: membrane2025
7+
- username: alice
8+
password: membrane
9+
- username: bob
10+
password: membrane2025
1311
target:
1412
url: https://api.predic8.de
1513

distribution/examples/security/login/apis.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ api:
88
location: ./dialog
99
staticUserDataProvider:
1010
users:
11-
- user:
12-
username: john
13-
password: password
14-
secret: abcdefghijklmnop
11+
- username: john
12+
password: password
13+
secret: abcdefghijklmnop
1514
totpTokenProvider: {}
1615
target:
1716
host: membrane-soa.org

distribution/examples/security/oauth2/api/authorization_server/apis.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ api:
88
# UserDataProvider is exchangeable, e.g. for a database table
99
staticUserDataProvider:
1010
users:
11-
- user:
12-
username: john
13-
password: password
14-
email: john@predic8.de
11+
- username: john
12+
password: password
13+
email: john@predic8.de
1514
staticClientList:
1615
clients:
1716
- clientId: abc

distribution/examples/security/oauth2/credentials/authorization_server/apis.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ api:
88
# UserDataProvider is exchangeable, e.g. for a database table
99
staticUserDataProvider:
1010
users:
11-
- user:
12-
username: john
13-
password: password
14-
email: john@predic8.de
11+
- username: john
12+
password: password
13+
email: john@predic8.de
1514
staticClientList:
1615
clients:
1716
- clientId: abc

distribution/examples/security/oauth2/implicit/authorization_server/apis.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ api:
1010
# UserDataProvider is exchangeable, e.g. for a database table
1111
staticUserDataProvider:
1212
users:
13-
- user:
14-
username: john
15-
password: password
16-
email: john@predic8.de
13+
- username: john
14+
password: password
15+
email: john@predic8.de
1716
staticClientList:
1817
clients:
1918
- client:

distribution/examples/security/oauth2/membrane/authorization_server/apis.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ api:
1010
# UserDataProvider is exchangeable, e.g. for a database table
1111
staticUserDataProvider:
1212
users:
13-
- user:
14-
username: john
15-
password: password
16-
email: john@predic8.de
13+
- username: john
14+
password: password
15+
email: john@predic8.de
1716
staticClientList:
1817
clients:
1918
- clientId: abc

distribution/examples/websockets/websocket-stomp/apis.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ api:
3434
flow:
3535
- basicAuthentication:
3636
users:
37-
- user:
38-
username: admin
39-
password: membrane
37+
- username: admin
38+
password: membrane
4039
- adminConsole: {}

distribution/router/conf/apis.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ api:
4343
# Protect the Admin Console using authentication (Basic, OAuth2, ACL, or none).
4444
- basicAuthentication:
4545
users:
46-
- user:
47-
username: admin
48-
password: admin
46+
- username: admin
47+
password: admin
4948
- adminConsole: {}

0 commit comments

Comments
 (0)