Skip to content

Commit

Permalink
fixup! feat!: implement proper serialization logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jun 4, 2024
1 parent d61492f commit ccb17a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/src/core/definitions/security/ace_security_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@ final class AceSecurityScheme extends SecurityScheme {
final result = super.toJson();

if (as != null) {
result["as"] = as;
result["ace:as"] = as;
}

if (audience != null) {
result["audience"] = audience;
result["ace:audience"] = audience;
}

if (scopes != null) {
result["scopes"] = scopes;
result["ace:scopes"] = scopes;
}

if (cnonce != null) {
result["cnonce"] = cnonce;
result["ace:cnonce"] = cnonce;
}

return result;
Expand Down
8 changes: 4 additions & 4 deletions test/core/definitions/serialization_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ void main() {
test("AceSecurityScheme", () async {
final aceSecuritySchemeJson = {
"scheme": "ace:ACESecurityScheme",
"as": "https://example.org",
"audience": "foobar",
"scopes": ["foo", "bar"],
"cnonce": true,
"ace:as": "https://example.org",
"ace:audience": "foobar",
"ace:scopes": ["foo", "bar"],
"ace:cnonce": true,
};

final parsedFields = {"scheme"};
Expand Down

0 comments on commit ccb17a6

Please sign in to comment.