Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Help Page sample generator ignore certain properties of a particular type

$
0
0

Is it possible to have the Help Page sample generator ignore certain properties of a particular type?

For example, we use the same request model for multiple operations.

public class Request
{
public string name;
public string address;
public string postalCode;
}

Now operation A will only use property name, and operation B will use address and postalCode properties.
But when you generate the help page the API will contain the parameters name, address and postalCode for both the operations like

GET A?name={name}&address={address}&postalCode={postalCode}
GET B?name={name}&address={address}&postalCode={postalCode}

I want to customize the API and the API should be -
GET A?name={name}
GET B?address={address}&postalCode={postalCode}

This will be more relevant to each operations


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>