Home » Microsoft » 70-532 v.2 » What are two possible ways to achieve the goal?
You need to update the Swagger API metadata to support all drug pricing and dosage software API methods. What are two possible ways to achieve the goal?
Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A. Update all controller methods by giving the methods unique names.
B. Update the Network Security Group security rules.
C. Create a custom IOperationFilter and cause Swashbuckle to use the implementation.
D. Update all methods with XML documentation comments and update the Swashbuckle configuration to use the XML documentation file.
E. Add the SwaggerResponse attributes to the Web API action methods.
Correct Answer: DE
Explanation/Reference:
Explanation:
D: Swashbuckle.AspNetCore is an open source project for generating Swagger documents for ASP.NET Core Web APIs.
We can tell Swashbuckle to use XML comments to add more details to the Swagger metadata. These are the same XML comments that ASP.NET Help Pages uses.
E: A template can help you start writing your first OpenAPI definition. The definition template feature creates a sparse OpenAPI definition by using all the metadata in the function.json file for each of your HTTP trigger functions. You’ll need to fill in more information about your API from the OpenAPI specification, such as request and response templates.
Scenario: You develop a drug pricing endpoint as an Azure App Service API app. The drug pricing endpoint requires API discovery that uses the Swagger RESTful API Documentation Specification (also known as the OpenAPI specification).
References: http://wmpratt.com/swagger-and-asp-net-web-api-part-1/
https://docs.microsoft.com/en-us/azure/azure-functions/functions-api-definition