MSON is a Markdown language for Data Modeling. Used with API Blueprint to create compact, readable API Descriptions. Presented at API Strategy & Practice conference, Boston, November 2016
schemas • Architects: ER diagrams and the like • Business users: spreadsheets & documents • API devs: API definitions, JSON Schema • Front-end folks: Core Data, GraphQL schemas
and business people • Usable by machines • Broad and articulate enough to describe most data models • Independent of implementation (defer architecture decisions) • DRY - duh
be seen • Parsable, Open Source Spec • Broad enough: Used by Apiary users this past year (7%) • Converts to JSON Schema (we’re in the API biz) …anything else you’d like in the future! • Encourages reuse
identifies user - name: Emmanuel Paraskakis (string, required) - Name of user - email: [email protected] (string, required) - User email # TeamMember (User) - team: Shoppers (required) - Team name - role: Dairy (nullable) - Role name
for MSON Conference talk Basic Project Management including tasks and team members ## Tasks [/tasks] A task can have a team member assigned to it. It can also be complete or incomplete ### List all [GET] - Response 200 (application/json) - Attributes (array[Task], fixed-type) ## Task [/tasks/{id}] ### Retrieve a Task [GET] - Response 200 (application/json) - Attributes (Task) ## Projects [/projects] A project is a named collection of tasks ### List all [GET] + Response 200 (application/json) - Attributes (array[Project], fixed-type) ## Project [/projects/{id}] ### Retrieve a Project [GET] + Response 200 (application/json) - Attributes (Project) ## TeamMember [/teammembers] A Team Member inherits from a User ### List all [GET] + Response 200 (application/json) - Attributes (array[TeamMember], fixed-type) ## TeamMember [/teammembers/{id}] - Attributes (User) - team: Shoppers (required) - Team name - role: Dairy (nullable) - Role name ### Retrieve a TeamMember [GET] + Response 200 (application/json) - Attributes (TeamMember) # Data Structures ## User - id: 1 (number, required) - Uniquely identifies user - name: Emmanuel Paraskakis (string, required) - Name of user - email: [email protected] (string, required) - User email ## Task - id: 42 (number, required) - Uniquely identifies task - title: Buy Milk (string, nullable) - Task title - complete: false (boolean) - Completion Status - teamMemberId: 1 (number) - Must exist as a Team Member ## Project - id: 84 (number, required) - Uniquely identifies project - name: Shopping List (string, nullable) - Name of project - tasks (array[Task], fixed-type) SAMPLE API BLUEPRINT (67 LINES) http://docs.apistratmsondemo.apiary.io https://github.com/APIStratDemo/msonapi