Skip to content
This repository was archived by the owner on Jun 23, 2019. It is now read-only.
This repository was archived by the owner on Jun 23, 2019. It is now read-only.

From AST JSON to API Blueprint: References become redundant model data #3

@rrarunan

Description

@rrarunan

Initial MD:

### Check if a Gist is Starred [GET]
+ Response 200

    [Star][]

Snowcrash Parsed JSON:

    {
              "name": "Check if a Gist is Starred",
              "description": "",
              "method": "GET",
              "parameters": {},
              "headers": {},
              "examples": [
                {
                  "name": "",
                  "description": "",
                  "requests": [],
                  "responses": [
                    {
                      "name": "200",
                      "description": "HAL+JSON representation of Star Resource.\n",
                      "headers": {
                        "Content-Type": {
                          "value": "application/hal+json"
                        },
                        "Link": {
                          "value": "<http:/api.gistfox.com/gists/42/star>;rel=\"self\""
                        }
                      },
                      "body": "{\n    \"_links\": {\n        \"self\": { \"href\": \"/gists/42/star\" },\n    },\n    \"starred\": true\n}\n",
                      "schema": ""
                    }
                  ]
                }
              ]
            }

Matter Compiler -> MD again

### Check if a Gist is Starred [GET]
+ Response 200 (application/hal+json)

    HAL+JSON representation of Star Resource.

    + Headers

            Link: <http:/api.gistfox.com/gists/42/star>;rel="self"

    + Body

            {
                "_links": {
                    "self": { "href": "/gists/42/star" },
                },
                "starred": true
            }

Shouldn't it be a link/reference again? [Star][]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions