Skip to content

Commit c7017fb

Browse files
committed
More improvements to OpenAPI spec
1 parent ef2683c commit c7017fb

2 files changed

Lines changed: 73 additions & 63 deletions

File tree

openapi/openapi.yaml

Lines changed: 66 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,47 @@ components:
417417
$ref: "#/components/schemas/RequestOptionsRequestVerificationMethod"
418418
additionalProperties: { }
419419
example:
420+
clientSecretMode: true
420421
network: testnet
421422
RequestOptionsRequestVerificationMethod:
422423
type: array
423424
items:
424425
$ref: "#/components/schemas/VerificationMethodTemplate"
426+
RequestSecret:
427+
description: This input field contains an object with DID controller keys
428+
and other secrets needed for performing the DID operation. See
429+
https://identity.foundation/did-registration/#secret.
430+
type: object
431+
properties:
432+
verificationMethod:
433+
$ref: "#/components/schemas/RequestSecretVerificationMethod"
434+
signingResponse:
435+
type: [object, null]
436+
additionalProperties:
437+
$ref: "#/components/schemas/SigningResponse"
438+
decryptionResponse:
439+
type: [object, null]
440+
additionalProperties:
441+
$ref: "#/components/schemas/DecryptionResponse"
442+
additionalProperties: { }
443+
example:
444+
seed: 72WGp7NgFR1Oqdi8zlt7jQQ434XR0cNQ
445+
verificationMethod:
446+
- id: did:indy:sovrin:WRfXPg8dantKVubE3HX8pw#key-1
447+
type: JsonWebKey2020
448+
privateKeyJwk:
449+
kty: OKP
450+
crv: Ed25519
451+
d: NzJXR3A3TmdGUjFPcWRpOHpsdDdqUVE0MzRYUjBjTlE
452+
x: jpIKKU2b77lNXKTNW2NGvw1GUMjU6v_l_tLJAH5uYz0
453+
RequestSecretVerificationMethod:
454+
type: array
455+
items:
456+
oneOf:
457+
- $ref: "#/components/schemas/VerificationMethodPublicDataPublicKeyJwk"
458+
- $ref: "#/components/schemas/VerificationMethodPublicDataPublicKeyMultibase"
459+
- $ref: "#/components/schemas/VerificationMethodPrivateDataPrivateKeyJwk"
460+
- $ref: "#/components/schemas/VerificationMethodPrivateDataPrivateKeyMultibase"
425461
CreateRequest:
426462
description: Input fields for a DID create operation.
427463
allOf:
@@ -738,6 +774,36 @@ components:
738774
content:
739775
$ref: "#/components/schemas/String"
740776
additionalProperties: { }
777+
DidStateSecret:
778+
description: This output field contains an object with DID controller keys and other secrets. See
779+
https://identity.foundation/did-registration/#didstatesecret.
780+
type: object
781+
properties:
782+
verificationMethod:
783+
$ref: "#/components/schemas/DidStateRequestSecretVerificationMethod"
784+
additionalProperties: { }
785+
example:
786+
verificationMethod:
787+
- id: did:indy:sovrin:WRfXPg8dantKVubE3HX8pw#key-1
788+
type: JsonWebKey2020
789+
privateKeyJwk:
790+
kty: OKP
791+
crv: Ed25519
792+
d: NzJXR3A3TmdGUjFPcWRpOHpsdDdqUVE0MzRYUjBjTlE
793+
x: jpIKKU2b77lNXKTNW2NGvw1GUMjU6v_l_tLJAH5uYz0
794+
DidStateRequestSecretVerificationMethod:
795+
type: array
796+
items:
797+
oneOf:
798+
- $ref: "#/components/schemas/VerificationMethodPublicDataPublicKeyJwk"
799+
- $ref: "#/components/schemas/VerificationMethodPublicDataPublicKeyMultibase"
800+
- $ref: "#/components/schemas/VerificationMethodPrivateDataPrivateKeyJwk"
801+
- $ref: "#/components/schemas/VerificationMethodPrivateDataPrivateKeyMultibase"
802+
- $ref: "#/components/schemas/DidStateSecretVerificationMethodVerificationMethodTemplate"
803+
DidStateSecretVerificationMethodVerificationMethodTemplate:
804+
type: array
805+
items:
806+
$ref: "#/components/schemas/VerificationMethodTemplate"
741807
DidStateFinished:
742808
allOf:
743809
- $ref: "#/components/schemas/DidState"
@@ -817,62 +883,6 @@ components:
817883
$ref: "#/components/schemas/String"
818884
waittime:
819885
$ref: "#/components/schemas/String"
820-
Secret:
821-
description: Secrets in requests and states.
822-
type: object
823-
x-parent: true
824-
properties:
825-
verificationMethod:
826-
$ref: "#/components/schemas/SecretVerificationMethod"
827-
additionalProperties: { }
828-
example:
829-
verificationMethod:
830-
- id: did:indy:sovrin:WRfXPg8dantKVubE3HX8pw#key-1
831-
type: JsonWebKey2020
832-
privateKeyJwk:
833-
kty: OKP
834-
crv: Ed25519
835-
d: NzJXR3A3TmdGUjFPcWRpOHpsdDdqUVE0MzRYUjBjTlE
836-
x: jpIKKU2b77lNXKTNW2NGvw1GUMjU6v_l_tLJAH5uYz0
837-
SecretVerificationMethod:
838-
type: array
839-
items:
840-
oneOf:
841-
- $ref: "#/components/schemas/VerificationMethodPublicDataPublicKeyJwk"
842-
- $ref: "#/components/schemas/VerificationMethodPublicDataPublicKeyMultibase"
843-
- $ref: "#/components/schemas/VerificationMethodPrivateDataPrivateKeyJwk"
844-
- $ref: "#/components/schemas/VerificationMethodPrivateDataPrivateKeyMultibase"
845-
- $ref: "#/components/schemas/SecretVerificationMethodVerificationMethodTemplate"
846-
SecretVerificationMethodVerificationMethodTemplate:
847-
type: array
848-
items:
849-
$ref: "#/components/schemas/VerificationMethodTemplate"
850-
RequestSecret:
851-
description: This input field contains an object with DID controller keys
852-
and other secrets needed for performing the DID operation. See
853-
https://identity.foundation/did-registration/#secret.
854-
allOf:
855-
- $ref: "#/components/schemas/Secret"
856-
- type: object
857-
properties:
858-
signingResponse:
859-
type: [object, null]
860-
additionalProperties:
861-
$ref: "#/components/schemas/SigningResponse"
862-
decryptionResponse:
863-
type: [object, null]
864-
additionalProperties:
865-
$ref: "#/components/schemas/DecryptionResponse"
866-
example:
867-
seed: 72WGp7NgFR1Oqdi8zlt7jQQ434XR0cNQ
868-
DidStateSecret:
869-
description: This output field contains an object with DID controller keys and other secrets. See
870-
https://identity.foundation/did-registration/#didstatesecret.
871-
allOf:
872-
- $ref: "#/components/schemas/Secret"
873-
- type: object
874-
example:
875-
seed: 72WGp7NgFR1Oqdi8zlt7jQQ434XR0cNQ
876886
SigningRequest:
877887
description: A signing request, see https://identity.foundation/did-registration/#signing-request-set.
878888
type: object

uni-registrar-core/src/main/patches/SecretVerificationMethodInner.patch renamed to uni-registrar-core/src/main/patches/DidStateRequestSecretVerificationMethodInner.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- src/main/java/uniregistrar/openapi/model/SecretVerificationMethodInner.java 2026-01-19 14:07:55.326011002 +0100
2-
+++ src/main/java/uniregistrar/openapi/model/SecretVerificationMethodInner.java.changed 2026-01-19 14:07:57.069704995 +0100
3-
@@ -108,17 +108,17 @@
1+
--- src/main/java/uniregistrar/openapi/model/DidStateRequestSecretVerificationMethodInner.java 2026-01-19 14:00:12.159445907 +0100
2+
+++ src/main/java/uniregistrar/openapi/model/DidStateRequestSecretVerificationMethodInner.java.changed 2026-01-19 14:04:24.063072670 +0100
3+
@@ -104,17 +104,17 @@
44
try {
55
boolean attemptParsing = true;
66
// ensure that we respect type coercion as set on the client ObjectMapper
@@ -24,7 +24,7 @@
2424
// TODO: there is no validation against JSON schema constraints
2525
// (min, max, enum, pattern...), this does not perform a strict JSON
2626
// validation, which means the 'match' count may be higher than it should be.
27-
@@ -339,7 +339,7 @@
27+
@@ -280,7 +280,7 @@
2828
}
2929

3030
static {
@@ -33,7 +33,7 @@
3333
schemas.put("VerificationMethodPrivateDataPrivateKeyJwk", VerificationMethodPrivateDataPrivateKeyJwk.class);
3434
schemas.put("VerificationMethodPrivateDataPrivateKeyMultibase", VerificationMethodPrivateDataPrivateKeyMultibase.class);
3535
schemas.put("VerificationMethodPublicDataPublicKeyJwk", VerificationMethodPublicDataPublicKeyJwk.class);
36-
@@ -362,7 +362,7 @@
36+
@@ -303,7 +303,7 @@
3737
*/
3838
@Override
3939
public void setActualInstance(Object instance) {
@@ -42,7 +42,7 @@
4242
super.setActualInstance(instance);
4343
return;
4444
}
45-
@@ -408,7 +408,7 @@
45+
@@ -349,7 +349,7 @@
4646
* @return The actual instance of `List<@Valid VerificationMethodTemplate>`
4747
* @throws ClassCastException if the instance is not `List<@Valid VerificationMethodTemplate>`
4848
*/
@@ -51,7 +51,7 @@
5151
return (List<@Valid VerificationMethodTemplate>)super.getActualInstance();
5252
}
5353

54-
@@ -514,11 +514,11 @@
54+
@@ -455,11 +455,11 @@
5555
}
5656
return joiner.toString();
5757
}

0 commit comments

Comments
 (0)