Skip to content

Conversation

@lucasteles
Copy link

By default, StronglyTypedId doesn't play very nicely with Swagger/OpenAPI docs:

  • When used on a route the try it out expects an object { Value: TId } which doesn't match with the Json serialize schema

  • When used on a returned model, request example and model schema are presented with the full object structure which also doesn't match with the JSON serialized schema

This PR adds an ISchemaFilter implementation option, which makes StronglyTypedId show as expected on SwaggerGen/OpenAPI documentation

Fix #58

@timschwallie
Copy link

Very much need this fix.

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.

StronglyTypedId generates incorrect OpenApi specification

2 participants