OpenApiOperationTransformerContext.GetOrCreateSchemaAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou crée un OpenApiSchema type pour le type spécifié. Augmente le schéma avec tous IOpenApiSchemaTransformerles s inscrits sur le document. S’il parameterDescription n’est pas null, le schéma est augmenté avec les ApiParameterDescription informations.
public System.Threading.Tasks.Task<Microsoft.OpenApi.OpenApiSchema> GetOrCreateSchemaAsync(Type type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = default, System.Threading.CancellationToken cancellationToken = default);
member this.GetOrCreateSchemaAsync : Type * Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.OpenApi.OpenApiSchema>
Public Function GetOrCreateSchemaAsync (type As Type, Optional parameterDescription As ApiParameterDescription = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OpenApiSchema)
Paramètres
- type
- Type
Type pour lequel le schéma est créé.
- parameterDescription
- ApiParameterDescription
Description facultative du paramètre pour augmenter le schéma.
- cancellationToken
- CancellationToken
Jeton d’annulation pour annuler l’opération.
Retours
Tâche qui représente l’opération asynchrone, avec une valeur de type OpenApiSchema.