Skip to content

(Validation)ProblemDetails as a separate NuGet package #12018

Closed
@mirekholec

Description

@mirekholec

Problem

ValidationProblemDetails & ProblemDetails are classes introduced in ASP.NET Core 2.1 as a part of Microsoft.AspNetCore.Mvc.Core (https://www.fuget.org/packages/Microsoft.AspNetCore.Mvc.Core). In typical scenario, Web API developer has a special project "Contracts" with various classes (API models) which are used for (de)serialization from/to api. The same contracts can be used on the client side (for example in SDK). It is typical that the part of the contracts are the problem details classes (described in RFC 7807).

The Problem is when I want to include this contracts into my SDK project or contract project, I must reference Microsoft.AspNetCore.Mvc.Core which has many unrelated references.

Solution

Classes reflecting some RFCs can have another NuGet package which can be a part of Microsoft.AspNetCore.Mvc.Core.

Additional context

Current workaround is to create another classes with the same properties. Of course this is not so clean way with unnecessary duplicity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: DuplicateResolved as a duplicate of another issuearea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions