Skip to content

OpenApi: How to change model name? #58999

Answered by martincostello
Thijmen asked this question in Q&A
Discussion options

You must be logged in to vote

I believe that the OpenApiOptions.CreateSchemaReferenceId property is the extension point for this:

/// <summary>
/// A delegate to determine how reference IDs should be created for schemas associated with types in the given OpenAPI document.
/// </summary>
/// <remarks>
/// The default implementation uses the <see cref="CreateDefaultSchemaReferenceId"/> method to generate reference IDs. When
/// the provided delegate returns <see langword="null"/>, the schema associated with the <see cref="JsonTypeInfo"/> will always be inlined.
/// </remarks>
public Func<JsonTyp…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@martincostello
Comment options

@Thijmen
Comment options

@Thijmen
Comment options

@martincostello
Comment options

@Thijmen
Comment options

Answer selected by Thijmen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants