Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New PATCH endpoint #384

Closed
wants to merge 3 commits into from
Closed

New PATCH endpoint #384

wants to merge 3 commits into from

Conversation

ivarne
Copy link
Member

@ivarne ivarne commented Dec 20, 2023

Implement a new PATCH endpoint using https://docs.json-everything.net/path/basics/

This is an early version that reverts most of #329, because this is a replacement solution and I don't want to add functionality that we don't indent do use. It does not (yet) attach to validations and the IDataProcessor don't have the oldModel argument.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)


if (appLogic != true)
{
_logger.LogError("Could not determine if {dataType} requires app logic for application {org}/{app}", dataType, org, app);

Check failure

Code scanning / CodeQL

Log entries created from user input High

This log entry depends on a
user-provided value
.
This log entry depends on a
user-provided value
.

if (appLogic != true)
{
_logger.LogError("Could not determine if {dataType} requires app logic for application {org}/{app}", dataType, org, app);

Check failure

Code scanning / CodeQL

Log entries created from user input High

This log entry depends on a
user-provided value
.

public class DataController_PatchFormDataImplementation
{
static Guid DataGuid = new ("12345678-1234-1234-1234-123456789123");

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity Note test

Field 'DataGuid' can be 'readonly'.
public class DataController_PatchFormDataImplementation
{
static Guid DataGuid = new ("12345678-1234-1234-1234-123456789123");
static Guid InstanceGuid = new ("12345678-1234-1234-1234-123456789124");

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity Note test

Field 'InstanceGuid' can be 'readonly'.
const string App = "endring-av-navn";
const int InstanceOwnerPartyId = 4766;
const string InstanceOwnerId = "4766";
private Mock<IDataProcessor> _dataProcessor = new(MockBehavior.Strict);

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity Note test

Field '_dataProcessor' can be 'readonly'.
const int InstanceOwnerPartyId = 4766;
const string InstanceOwnerId = "4766";
private Mock<IDataProcessor> _dataProcessor = new(MockBehavior.Strict);
private Instance instance = new ();

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity Note test

Field 'instance' can be 'readonly'.
src/Altinn.App.Api/Controllers/DataController.cs Dismissed Show dismissed Hide dismissed
src/Altinn.App.Api/Controllers/DataController.cs Dismissed Show dismissed Hide dismissed
src/Altinn.App.Api/Controllers/DataController.cs Dismissed Show dismissed Hide dismissed
Copy link

sonarcloud bot commented Dec 20, 2023

Quality Gate Failed Quality Gate failed

Failed conditions

59.9% Coverage on New Code (required ≥ 65%)
47.22% Condition Coverage on New Code (required ≥ 65%)

See analysis details on SonarCloud

@ivarne ivarne closed this Jan 22, 2024
@ivarne ivarne deleted the ivarne/newDataPatch branch October 10, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant