docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Get XML documentation from satellite library

Open vdecristofaro opened this issue 10 years ago • 3 comments

Hello,

My web api project exports XML documentation file and docfx create documentation correctly.

However for some endpoints, I still do not understand how to fill some fields. Please see the following picture for details

image

  1. How do I fill the fields with red question?

Also in the case where an endpoint has an input based on a POCO defined in another assembly the documentation is very poor even if the object is correctly defined in the swagger file. See the following sample:

image

and an extract of the swagger document

    "/pc/associate": {
      "post": {
        "tags": [
          "Loyalty"
        ],
        "summary": "Associate a promocard to a user",
        "operationId": "Associate",
        "parameters": [
          {
            "name": "model",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AssociateCardViewModel"
            },
            "x-nullable": true,
            "description": "An  object that contains information about the cardholder"
          }
        ],

    [..........]

    "AssociateCardViewModel": {
      "type": "object",
      "x-typeName": "AssociateCardViewModel",
      "additionalProperties": false,
      "required": [
        "Card",
        "Email",
        "Shop",
        "Terminal"
      ],
      "properties": {
        "Card": {
          "type": "string"
        },
        "Email": {
          "type": "string"
        },
        "Shop": {
          "type": "string"
        },
        "Terminal": {
          "type": "string"
        },
        "CardData": {
          "$ref": "#/definitions/ExtendedCardDataViewModel"
        }
      }
    },

How do I can handle these cases?

vdecristofaro avatar Sep 29 '16 09:09 vdecristofaro

@vdecristofaro refer to template rest.child.tmpl.partial, in parameters:

  1. value is supposed to be rendered as default value of this parameter, refer to default definition of parameter schema.
  2. type is to show type of this parameter, but if the type is not simple type, in you case it's a reference definition, we have task #465 to show full of complex type but not implement yet.

In responses, the samples is showing samples of this response, refer to example schema and there's samples there.

hellosnow avatar Sep 29 '16 09:09 hellosnow

Thanks @hellosnow. I'll leave the issue open while the #465 will be closed as well.

vdecristofaro avatar Sep 29 '16 15:09 vdecristofaro

Close as the questions in this issue is resolved. Leave #465 to track the remaining feature.

superyyrrzz avatar Mar 05 '19 09:03 superyyrrzz