Skip to content

Instantly share code, notes, and snippets.

@klokane
klokane / MSON-mip.md
Created May 22, 2015 14:14
MSON Memebers vs. Items vs. Properties

Data Structures

a1 (array)

Members

  • a
  • b
@klokane
klokane / direct-Inheritance.md
Last active August 29, 2015 14:23
Refract element Mixins expansion
## Address (object)
- street
- city

## User (Address)
- id
- login
@klokane
klokane / enum.md
Last active August 16, 2017 15:26
API elements - Enum

Enum part of definition

- size16: A (enum) 
    - D
    - E

    - sample
        - F
        - G
@klokane
klokane / enum.md
Created September 6, 2017 11:03
API Elements - EnumElement Proposals

What is wrong with EnumElement

All element structure descriptions are stored in content (value in C++)

For primitive types it hold final value (number, string, bool) For complex types there is stored definitions:

  • object: members (can be leaf (primitive type) or branch (another level of complex type)
  • array: there are stored all values which user define

In both cases there is stored complet definition of object

Enum Rules (by priority)

  • one value

    • elm.content
  • multiple values

    • add elm.attr.enumerations
  • default

  • enum element with elm.content

@klokane
klokane / canned-responses.md
Last active November 17, 2019 22:05
MSON ideas

Canned Responses

## Generic Responses(*T*)
- Include (*T*)

## Default 4XX
+ Response 404 (application/json)
   - message: Not Found
   
+ Response 401 (application/json)