Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

reading uriParameters, has no example and description any properties ... #829

Open
xbl opened this issue Nov 8, 2018 · 1 comment
Open

Comments

@xbl
Copy link

xbl commented Nov 8, 2018

Hi guys, I can get uriParameters any properties

"version": "1.1.48"

#%RAML 1.0
---
title: mb-collection API
baseUri: /
...
/{id}:
  get:
    description: 商品详情
    uriParameters:
      id:
        enum: [123132123, 3454543543543 ]
        type: integer
        displayName: product id
        description: 商品详情id
        example: 122321312
    responses:
      200:
        body:
          type: Product
          example: !include ./product_200.json

javascript code:

...
 apiJSON.allResources().forEach(resource => {
    const absoluteUri = resource.absoluteUri();
    resource.allUriParameters().forEach(parameter => {
      console.log(parameter.toJSON());
      console.log(parameter.description());
    });
...

results:
image

@postatum
Copy link
Contributor

Note that raml-js-parser-2 has been deprecated, the new official parser is webapi-parcser. Feel free to attempt to reproduce this issue with webapi-parser and report any issue you may have on that repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants