Skip to content

StronglyTypedId generates incorrect OpenApi specificationΒ #58

@nZeus

Description

@nZeus

Hello,

I have a Strongly Typed Id struct ConsentCollectionId

[StronglyTypedId(backingType: StronglyTypedIdBackingType.Guid, StronglyTypedIdConverter.SystemTextJson)]
public partial struct ConsentCollectionId { }

This type is used as a parameter in one of my controllers. Unfortunately, the generated open-api specification file contains the wrong type description:
image

Instead of

{
  "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

it should be just

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Do you know if there is a way to change this?
As a work-around, I changed the type of the parameter back to Guid and do the mapping manually.

Kind regards,
Ilia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions