Skip to content

Possible mismatch between ID in URL and Patch body #702

Closed
@bart-degreed

Description

@bart-degreed

JADNC ignores any ID value in a request URL (for example: /api/v2/people/123) when using the PATCH verb. It only uses the value from the request body.

I think we should assert that both are equivalent and fail on mismatch in DefaultResourceService.UpdateAsync().

Also, it looks like the signature of DefaultResourceRepository.UpdateAsync was changed from:

public virtual async Task<TResource> UpdateAsync(TId id, TEntity updatedEntity)

to:

public virtual async Task<TResource> UpdateAsync(TResource updatedEntity)

during development of v4. This makes it impossible to change the ID of a resource, so I think this change should be reverted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions