Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

C# Comment Tag Guide

Shweta Patil edited this page Apr 27, 2018 · 14 revisions

All tags are optional EXCEPT <url> and <verb>.

<url>

Example: <url>http://localhost:9000/V1/samples</url>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Relative path in Text #/paths For example, if the text is http://localhost:9000/V1/samples, then only /V1/samples is parsed into the path identifier.

<verb>

Example: <verb>GET</verb>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Text #/paths/{path}

<group>

Example: <group>Sample V1</group>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Text #/paths/{path}/{method}/tags

<summary>

Example: <summary>API summary<summary>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Text #/paths/{path}/{method}/summary

<remarks>

Example: <remarks>API description<remarks>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Text #/paths/{path}/{method}/description

<param> when in attribute is not body

Example: <param name="sampleHeaderParam1" cref="float" in="header">Header param 1</param>

Alternate tag(s) allowed:

  • <queryParam> (equivalent to <param in="query">)
  • <headerParam> (equivalent to <param in="header">)
  • <pathParam> (equivalent to <param in="path">)

Remarks: If in attribute is not given but the parameter name is present in the <url> tag, the processor will also automatically populate the in attribute for that <param> tag as either path or query as appropriate.

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Text #/paths/{path}/{method}/parameters/{i}/description
Attribute name #/paths/{path}/{method}/parameters/{i}/name
Attribute in #/paths/{path}/{method}/parameters/{i}/in
Attribute cref #/paths/{path}/{method}/parameters/{i}/schema The type provided can be a primitive type or a class. The reader will resolve it using the given DLLs and create an appropriate schema object for it.

<param> when in attribute is body

Example: <param name="sampleObject" in="body"><see cref="SampleObject1"/>Sample object</param>

Alternate tag(s) allowed: <requestType>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Text #/paths/{path}/{method}/requestBody/description
Attribute type #/paths/{path}/{method}/requestBody/content Media type e.g. application/json
Attribute cref of inner node <see> #/paths/{path}/{method}/requestBody/content/{type}/schema The type provided can be a primitive type or a class. The reader will resolve it using the given DLLs and create an appropriate schema object for it.

<response>

Example: <response code="200"><see cref="SampleObject1"/>The sample object updated</response>

Alternate tag(s) allowed: <responseType>

Part of the tag JSON pointer to corresponding OpenAPI document (V3.0) entity Remarks
Attribute code #/paths/{path}/{method}/responses The HTTP Status code e.g. 200
Attribute type #/paths/{path}/{method}/responses/{statusCode}/content Media type e.g. application/json
Attribute cref of inner node <see> #/paths/{path}/{method}/responses/{statusCode}/content/{type}/schema The type provided can be a primitive type or a class. The reader will resolve it using the given DLLs and create an appropriate schema object for it.

Clone this wiki locally