Skip to content

Instantly share code, notes, and snippets.

@samuelgoto
Last active July 17, 2018 00:33
Show Gist options
  • Save samuelgoto/a083b00fea29c0db39a8a9aa3e2ef0f7 to your computer and use it in GitHub Desktop.
Save samuelgoto/a083b00fea29c0db39a8a9aa3e2ef0f7 to your computer and use it in GitHub Desktop.

Discovery

<link rel="alternate" href="/api" type="application/vnd.microforms">

Self-described payloads

{
  name: "Walgreens API",
  description: { value: "Welcome to the Walgreens API. This is a self-described API that you can use. " },
  a: 1,
  b: 2,
  ...
  form {
    method: "POST"
    action: "/create.php"
    label { for: "firstName" value: "First name" }
    input {
      name: "firstName"
      required: true
      autocomplete: "lastName"
    }
    label { for: "lastName" value: "Last name" }
    input {
      name: "lastName"
      required: true
      autocomplete: "lastName"
    }
    select {
      name: "plan"
      option { value: "basic" }
      option { value: "advanced" }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment