Code Monkey home page Code Monkey logo

raml-examples's Introduction

Current RAML Versions: RAML 1.0

RAML Examples

This repository contains valid RAML examples. These examples are not only part of the spec, but also represent RAML features in different scenarios.

raml-examples's People

Contributors

jstoiko avatar mrxinu avatar naterkane avatar nialdarbey avatar petrochenko-pavel-a avatar sichvoge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raml-examples's Issues

Please create one example file containing all possible items

I'm working on a tool that will generate printable PDF documents from a RAML spec and would love to have one 'definitive' file I can use that implements all elements available in RAML. Being able to successfully render this test file would indicate that the tool works properly.

RFC3339 Doesn't work with Time offset

I'm putting an example of a RFC3339 compliant Time Code with a Timezone Offset in my RAML example and as far as I can tell it is RFC3339 complient, except that RAML says it's a bad date-time.

  orderDate?: 
    type: datetime
    example: 2016-02-28T16:41:41-4:00
    format: rfc3339 

According to RFC documentation examples, this is valid:

1996-12-19T16:39:57-08:00
   This represents 39 minutes and 57 seconds after the 16th hour of
   December 19th, 1996 with an offset of -08:00 from UTC (Pacific
   Standard Time).  Note that this is equivalent to 1996-12-20T00:39:57Z
   in UTC.```

Problem with discriminator property in typesystem/complex.raml example

In example typesystem/complex.raml, there are two problematic properties in the body :
kind: admin
kind: manager

The issue was noticed using version 1.0.0 of the raml-java-parser, as parsing the example fails with the following errors:

- message: "Invalid type name: admin"
- message: "Invalid type name: manager"

After reading the spec, it seems to me that the example should either use the discriminatorValue facet in the Admin and Manager type declaration, or use uppercase for admin and manager when discriminating between the types.

If I am following the banking-api example, how do I add examples per endpoint?

First of all thank you for adding the amazing banking-api example. My question is if I'm following that structure what is best practice for per-endpoint examples for the type system. For example, we have this.

post:
  description: Creates <<resourcePathName | !singularize>> data
  responses:
    201:
      body:
        application/json:
          type: <<get-response-type>>

with

/users:
  type:
    member:
      post-request-type: types.thing
  post:

For solutions I have tried:

/users:
  type:
    member:
      post-request-type: types.thing
        example:
          user: Patrick
          password: securepass       
  post:

and

/users:
  type:
    member:
      post-request-type: types.thing
  post:
    example:
      user: Patrick
      password: securepass 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.