Skip to content

Commit

Permalink
Fix nullability and update a few minor things in the generated swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarne committed Nov 21, 2024
1 parent 83a0827 commit dde5b9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/Altinn.App.Api/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ internal sealed class OtelPropagator : TextMapPropagator

public OtelPropagator(TextMapPropagator inner) => _inner = inner;

public override ISet<string> Fields => _inner.Fields;
public override ISet<string>? Fields => _inner.Fields;

public override PropagationContext Extract<T>(
PropagationContext context,
T carrier,
Func<T, string, IEnumerable<string>> getter
Func<T, string, IEnumerable<string>?> getter
)
{
if (carrier is HttpRequest)
Expand Down
2 changes: 2 additions & 0 deletions src/Altinn.App.Core/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ IWebHostEnvironment env
#pragma warning restore CS0618 // Type or member is obsolete
services.AddHttpClient<IProcessClient, ProcessClient>();
services.AddHttpClient<IPersonClient, PersonClient>();
#pragma warning disable EXTEXP0018 // is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
services.AddHybridCache();
#pragma warning restore EXTEXP0018

services.TryAddTransient<IUserTokenProvider, UserTokenProvider>();
services.TryAddTransient<IAccessTokenGenerator, AccessTokenGenerator>();
Expand Down
17 changes: 5 additions & 12 deletions test/Altinn.App.Api.Tests/OpenApi/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5259,8 +5259,7 @@
"actions": {
"type": "object",
"additionalProperties": {
"type": "boolean",
"nullable": true
"type": "boolean"
},
"nullable": true
},
Expand Down Expand Up @@ -5479,8 +5478,7 @@
"features": {
"type": "object",
"additionalProperties": {
"type": "boolean",
"nullable": true
"type": "boolean"
},
"nullable": true
},
Expand Down Expand Up @@ -6503,12 +6501,8 @@
"JsonNodeOptions": {
"type": "object",
"properties": {
"hasValue": {
"type": "boolean",
"readOnly": true
},
"value": {
"$ref": "#/components/schemas/JsonNodeOptions"
"propertyNameCaseInsensitive": {
"type": "boolean"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -7349,8 +7343,7 @@
"items": {
"$ref": "#/components/schemas/ValidationIssueWithSource"
}
},
"nullable": true
}
},
"nullable": true
},
Expand Down
8 changes: 1 addition & 7 deletions test/Altinn.App.Api.Tests/OpenApi/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3215,7 +3215,6 @@ components:
type: object
additionalProperties:
type: boolean
nullable: true
nullable: true
userActions:
type: array
Expand Down Expand Up @@ -3374,7 +3373,6 @@ components:
type: object
additionalProperties:
type: boolean
nullable: true
nullable: true
logo:
$ref: '#/components/schemas/Logo'
Expand Down Expand Up @@ -4115,11 +4113,8 @@ components:
JsonNodeOptions:
type: object
properties:
hasValue:
propertyNameCaseInsensitive:
type: boolean
readOnly: true
value:
$ref: '#/components/schemas/JsonNodeOptions'
additionalProperties: false
JsonPatch:
type: object
Expand Down Expand Up @@ -4727,7 +4722,6 @@ components:
type: array
items:
$ref: '#/components/schemas/ValidationIssueWithSource'
nullable: true
nullable: true
clientActions:
type: array
Expand Down

0 comments on commit dde5b9c

Please sign in to comment.