raml-org / raml-js-parser

(deprecated) A RAML parser based on PyYAML written in CoffeScript and available for use as NodeJs module or in-browser.
195 stars 53 forks source link

"property: 'displayName' is invalid in a method" contrary to spec? #108

Closed alecthomas closed 9 years ago

alecthomas commented 10 years ago

The spec doesn't seem to specifically mention displayName on methods, but examples within the spec include them. See the third example here:

#%RAML 0.8
title: Users API
version: 1
baseUri: https://{apiDomain}.someapi.com
/users:
  displayName: retrieve all users
  baseUriParameters:
    apiDomain:
      enum: [ "api" ]
  /{userId}/image:
    displayName: access users pictures
    baseUriParameters:
      apiDomain:
        enum: [ "static" ]
    get:
      displayName: retrieve a user's picture
    put:
      displayName: update a user's picture
      baseUriParameters:
        apiDomain:
          enum: [ "content-update" ]

The RAML JS parser seems to disallow this.

usarid commented 10 years ago

That sounds like it could be a bug in the parser, but then again we also didn't officially document the displayName property of methods, though we certainly had it in mind as evidenced by all the examples. Let me go back and check...

palanik commented 9 years ago

Any update on this issue?

There is an inconsistency between the spec., example and the parser. This was implemented via this PR as seen here.

Open issue on the spec.: Add displayName for methods #74

palanik commented 9 years ago

Thank you @aldonline.

aldonline commented 9 years ago

Hello @palanik . Note: We still haven't NPM published the latest version ( 0.8.9 ). So you will have install manually by cloning the master branch and then running NPM install. It will be done in the next few days.

palanik commented 9 years ago

Got it. For now, I'm pulling the lib from git for development. ("raml-parser": "https://github.com/raml-org/raml-js-parser/tarball/master")

aldonline commented 9 years ago

  @palanik published ;)

palanik commented 9 years ago

@aldonline Thanks again. Looks good.