Skip to content

Provide a snippet for documenting request and response structure #277

Open
@wilkinsona

Description

@wilkinsona

With complex, heavily nested payloads some people have found the table of fields that's currently produced by the request and response fields snippets a little difficult to use when trying to determine the structure.

A suggestion has been to reflect the nesting in the documentation, ideally with collapsible sections. A relatively simple, albeit without collapsible sections, approach would be something like this:

{
    "userName": String,
    "name": {
        "familyName": String,
        "givenName": "String
    },
    "phoneNumbers": [ {
        "value": String
    } ],
    "emails": [ {
        "value": String,
        "primary": Boolean
    } ],
    "active": Boolean,
    "verified": Boolean,
    "origin": String,
    "externalId": String
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementEnhancement that adds a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions