Questions tagged [mson]

Markdown Syntax for Object Notation (MSON)

MSON is a plain-text, human and machine readable, description format for describing data structures in common markup formats such as JSON, XML or YAML.

mson github project

34 questions
12
votes
1 answer

Trying to describe the request and response using Data Structures in API Blueprint

I'm trying to document an endpoint with API Blueprint, using the new Attributes and DataStructures sections of the spec. My request payload looks like this: { "url": "http://requestb.in/11v7i7e1", "active": true, "types": [ { …
Piotr Zurek
  • 2,583
  • 1
  • 23
  • 32
6
votes
1 answer

Use pattern in API Blueprint / MSON

I'm investigating the possibilities of the new Data Structures syntax in API Blueprint, especially MSON. Is it possible to attach or rather specify something like a pattern (regex)? Don't found anything on this topic.
loxy
  • 283
  • 2
  • 9
5
votes
2 answers

API Blueprint - Avoid repeating authorization blocks

In API Blueprint, how do I avoid using the same request Authorization header block over and over for every endpoint? + Request (application/json) + Headers Authorization: Bearer jsonWebToken Is there a way to template this in a…
Drew Baker
  • 13,308
  • 12
  • 50
  • 90
5
votes
1 answer

How can I define array of enums in API blueprint

My supposed solution for parameters section is + fields: [firstField, secondField] (array[enum], optional) + Members + firstField + secondField + extraField + dummyField But it failed on semantic error: The example value…
3
votes
1 answer

How to reference enum value in API Blueprint(MSON)

I'm using API Blueprint and Agilo to render my API documentation. When using enum type, I'm observing a weird behavior. The response is not shown with the defined enum value whereas the schema is showing all the enum values (which is expected) along…
Haran
  • 730
  • 1
  • 8
  • 20
3
votes
1 answer

How to specify multiple possible types (type union) for array in MSON?

I'm struggling a bit to describe what I need exactly but I spent some time browsing the MSON spec and didn't find anything. This example is a bit contrived but hopefully the intention is clear. # Animal (object) This is a base class for all…
user1915201
  • 93
  • 1
  • 8
3
votes
1 answer

MSON specifying a date-time

How can the following MSON output a schema with "format":"date-time", similar to the stated below? Mson: FORMAT: 1A # Some API ## series [/api/v1/series] Returns a list of series. ### View all series [GET] + Response 200 (application/json;…
user1990009
  • 685
  • 6
  • 13
3
votes
1 answer

JSON to blueprint/MSON

I havent been able to find any tools for this conversion, does anyone know of any that exist. Currently, I have JSON data from Swagger that I would like to convert to Blueprint/MSON to use with Apiary, but I am not sure if this is possible. Any…
hmucity
  • 31
  • 5
2
votes
1 answer

api blueprint mson object with different values

I have a collection response which gives back an array of user objects and want to have different values for the user attributes without to create multiple user objects. Is there a way to do this? # Group Users ## Users Collection…
2
votes
1 answer

Referencing a property inside a defined data structure in API Blueprint/MSON

I've been working with the API Blueprint format for designing an API and have had a lot of fun working with it. When I was declaring my data structures I came upon a code reuse or model reuse issue. According to the documentation when declaring a…
Arnold Balliu
  • 978
  • 8
  • 19
2
votes
1 answer

Api blueprint failing with dredd on a realtime api?

I am in the middle of upgrading dredd from 1.08 to the latest version, while at it, I am trying to validate our api documentation, written in blueprint with the realtime test api and it is failing. Since the tests are running against a real time…
Nauman Bashir
  • 1,672
  • 3
  • 17
  • 25
2
votes
2 answers

Dredd / apiary / MSON array of any size

we're struggling describing an array of any size in our API. Using API Blueprint and MSON format for Dredd testing. Endpoint /spots should return an array of "Spots" (those are objects). We don't know how many though. Currently we have only been…
vicdup
  • 149
  • 4
2
votes
1 answer

Omit property of object defined in MSON

How can I ommit property from defined MSON? I have defined one simple entity (object) using MSON: # Data Structures ## Article (object) Represents an article ## Properties + id: 1 (number, optional) + name: My first article (string) ## Articles…
Northys
  • 1,232
  • 2
  • 14
  • 30
2
votes
1 answer

Primitive type as data structure for API Blueprint

I want to use primitive type for describe data structure. Like so: # Data Structures ## Video Delete (enum[number]) + `0` - Successful deletion. + `1` - Error occured. And the output is. { "enum": [ 1, 0 ], "$schema":…
witzawitz
  • 378
  • 1
  • 4
  • 11
2
votes
1 answer

MSON Array Object "undefined" Error in API Blueprint

We are developing a new API using HAL+JSON, leveraging Apiary.io's API Blueprint. We have been using JSON in our responses within the Blueprint itself. I'm testing a shift to using MSON instead, but am having an issue with an array object. Here is…
1
2 3