首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >标题和正文下的芹菜蓝图属性不被识别

标题和正文下的芹菜蓝图属性不被识别
EN

Stack Overflow用户
提问于 2018-05-03 15:19:12
回答 1查看 969关注 0票数 1

Final :此操作不存在语义错误:

代码语言:javascript
复制
+ Request

    + Headers

            Accept: application/json
            Content-Type: application/json
            X-Auth-Client: Your Client Id
            X-Auth-Token: Your Token

    + Body

    + Attributes (ProductPost)


+ Response 200

    + Headers

            Content-Encoding: Entity header is used to compress the media-type.
            Content-Type: application/json
            Date: The date the response was sent.
            Transfer-Encoding: Header specifies the form of encoding used to safely transfer the entity to the user.
            Vary: HTTP response header determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server. We use Accept Encoding
            X-Rate-Limit-Requests-Left: Header details how many remaining requests your client can make in the current window before being rate-limited. 
            X-Rate-Limit-Requests-Quota: Header shows how many API requests are allowed in the current window for your client 
            X-Rate-Limit-Time-Reset-Ms: Header shows how many milliseconds are remaining in the window. 
            X-Rate-Limit-Time-Window-Ms: Header shows the size of your current rate-limiting window

    + Body

    + Attributes (ProductResponse)

编辑:标题部分正在呈现,但现在主体部分只是显示文本“+属性(ProductPost)”

代码语言:javascript
复制
+ Request

    + Headers

            Accept: application/json
            Content-Type: application/json
            X-Auth-Client: Your Client Id
            X-Auth-Token: Your Token



+ Response 200

    + Headers

            Content-Encoding: Entity header is used to compress the media-type.
            Content-Type: application/json
            Date: The date the response was sent.
            Transfer-Encoding: Header specifies the form of encoding used to safely transfer the entity to the user.
            Vary: HTTP response header determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server. We use Accept Encoding
            X-Rate-Limit-Requests-Left: Header details how many remaining requests your client can make in the current window before being rate-limited. 
            X-Rate-Limit-Requests-Quota: Header shows how many API requests are allowed in the current window for your client 
            X-Rate-Limit-Time-Reset-Ms: Header shows how many milliseconds are remaining in the window. 
            X-Rate-Limit-Time-Window-Ms: Header shows the size of your current rate-limiting window


    + Body

            + Attributes (ProductCollectionResponse)

我正在尝试定义请求体,在阅读了以下内容之后:101/apib-authentication/ & https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md#def-headers-section

好像我可以把它们分成几个部分。但是属性部分没有被识别。这是一个/GET请求。

知道为什么吗?

代码语言:javascript
复制
+ Request (application/json)

    + Headers

        + Attributes (RequestHeaders) 

    + Body

        + Attributes (ProductPost)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-03 15:46:54

Header部分不能包含属性,您需要显式地定义它们。只需替换:

代码语言:javascript
复制
    + Attributes (RequestHeaders) 

RequestHeaders的定义。

还尝试在同一列中对齐主体和属性:

代码语言:javascript
复制
+ Body
+ Attributes (ProductPost)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50158592

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档