Git Product home page Git Product logo

raml2html-slate-theme's People

Contributors

arthurflag avatar dependabot-preview[bot] avatar dependabot[bot] avatar estylianou avatar greenkeeper[bot] avatar hotgazpacho avatar kevinrenskers avatar simonflk avatar wdullaer avatar yyamano avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

raml2html-slate-theme's Issues

An in-range update of raml2html is breaking the build 🚨

Version 6.1.1 of raml2html just got published.

Branch Build failing 🚨
Dependency raml2html
Current Version 6.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As raml2html is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Commits

The new version differs by 9 commits .

  • 59bbc02 Update 3rd party dependencies
  • 2db451e Merge branch 'master' into develop
  • 8dbed7a Added contributing steps to the readme
  • cb38f02 Use the github name of raml-js-parser-2
  • 2178bab Simplify readme
  • 97dfa57 Use new raml2obj and new default theme. Update versions, and remove now unused code.
  • 3511834 We don't need glob
  • 7f88548 We have multiple examples
  • e587273 Fix test script

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

description of response status codes

Hey, first of all: great template.

We have descriptions set on our reponse status codes. For example:

responses:
                200: 
                    description: |
                        - Returns one job, if any action is required.
                        - Each job contains `jobType`, `jobId` and an `executeTime`.
                        - Jobs can additionally contain a set of requirements (`required`) which must be met before executing the job.
                        - The optional `meta` property contains jobspecific informations.
                204:
                    description: Returns an empty answer, if no jobs are available.

Could you display the reponse status codes including description on the right hand side?
We thought of a structure like:

CURL Example
...

Response 200
... Description ...

Reponse Body
... Examples ...

Response 204
... Description ...

Reponse Body
... Examples ...

If you have a readme or guide on how to add missing parts of the raml specification to the theme, we'd be glad to support you with pull requests, too.

curl commands are not rendered with security headers

When specifying that a resource is securedBy as entry in the securitySchemes, the curl command generated for that resource does not include the relevant headers, thus creating an incomplete curl request. The supported security schemes list is finite, and most involve setting HTTP headers, such as Authorization or X-API-Key. The definitions of securitySchemes are pretty expressive, too.

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Generate color theme throws an error

Running the following command to generate the color theme
$ raml2html --theme "raml2html-slate-theme" -o "myhtml.html" -i "myraml.raml" --generate-color-theme

Get the following output:

[...]

////////////////////////////////////////////////////////////////////////////////
// INTERNAL
////////////////////////////////////////////////////////////////////////////////
// These settings are probably best left alone.
$break-words
-ms-word-break: break-all
word-break: break-all

/* Non standard for webkit */
word-break: break-word

-webkit-hyphens: auto
-moz-hyphens: auto
hyphens: auto
internal/fs/utils.js:259
throw err;
^

Error: ENOENT: no such file or directory, lstat '.../node_modules/raml2html-slate-theme/index.nunjucks'
at Object.realpathSync (fs.js:1646:7)
at getConfigForTemplate (/.../node_modules/raml2html/index.js:68:41)
at Object.getConfigForTheme (/.../node_modules/raml2html/index.js:156:12)
at Object. (/.../node_modules/raml2html/bin/raml2html:69:22)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'lstat',
code: 'ENOENT',
path: '/.../node_modules/raml2html-slate-theme/index.nunjucks'

Add support for x-www-form-urlencoded

Currently it is not possible to specify parameters and "x-www-form-urlencoded" them.

As an example:

body:
  application/x-www-form-urlencoded:
    properties:
      name:
        description: name on account
        type: string
        example: Naruto Uzumaki
      gender:
        enum: ["male", "female"]

This renders to:

image

Instead it should show an example like:

curl -d "name=Naruto Uzumaki&gender=male" -X POST https://example.com/oauth2/token

This is especially problematic, as one wants to describe an oauth flow, which "x-www-form-urlencoded" its parameters.

Sidenote: It was also requested here: https://github.com/raml2html/raml2html/issues/386

type information in the response body is missing the schema reference

Hi,
Thanks for the theme. It is really good to see other layouts.
I have some RAML response body like below and I cannot see the type (schema) reference in RAML is shown in the final HTML. is it possible to do so ?

The type is defined at the beginning of the RAML using types:. I tried to play with but can only output the word "xml". How can we show "type" as like "orders" and may be provide a link to type schema defined in the beginning.

    responses:
      200:
      .....
        body:
          application/xml:
            description: XML representation of the list of orders
            type: order
            example: !include examples/order.xml

Enhancement to rendering multiple examples

Is there any possibility to have tabs when someone defined multiple examples with the name each tab reflecting the key name of an example? For example:

examples: 
        test1: |
          {
            "address_country": "terte",
            "address_locality": "ertth",
            "address_region": "dgere",
            "postal_code": "sdfsdg",
            "street_address": "gdfgdfg"
          }
        test2: |
          {
            "address_country": "terte",
            "address_locality": "ertth",
            "address_region": "dgere",
            "postal_code": "sdfsdg",
            "street_address": "gdfgdfg"
          }

I would expect two tabs called test1 and test2 with the respective content.

At the moment each example is put under the other.

image

what is supported and what isn't?

Hi @wdullaer,

First, very nice work - looks great and having it as a theme for raml2html is definitely a great win!

Second, can you highlight what things are currently not supported so that I know what to look out for and not raise as a bug :)

My test base is the this example (also the one that raml2html has) and there are information not rendered yet.

Thanks,
Christian

JSON schema not displayed

Hi and thanks for the great work on this theme!

I have an issue with the following raml file:

#%RAML 1.0
title: API title
version: v0
documentation:
  - title: API title 2
baseUri: https://stuff.net/v0/d
mediaType: application/json

/import:
  displayName: import displayname
  post:
    description: Creates a some stuff
    body:
      application/json:
        type: !include messages/import_job_post_request.json
    responses:
      201:
        description: |
          Some stuff
        body:
          application/json:
            type: !include messages/import_job_post_response.json

I get the following output
screen shot 2018-05-09 at 16 33 41

The schemas are not resolved.

Is it because they are not in the RAML file itself?
Would it be possible to update the theme so that it digs into the json schema files?

Thanks for the info!

"no such file or directory" after first install and first run

Hello,
I'm receiving this error when I'm trying to run the command for doc generation:
error: ENOENT: no such file or directory, lstat '/usr/lib/node_modules/raml2html-slate-theme/index.nunjucks'

Steps to reproduce:
1 - install the raml2html slate theme
2 - run the command to generate the doc

Env :
CentOS 7
RAML 1.0
Nodejs : v6.9.1

ps : I can successfully generate the doc with the default theme

and this is my /usr/lib/node_modules/raml2html-slate-theme/ content :

 ⚡ root@my-sexy-server /usr/lib/node_modules/raml2html-slate-theme  ll
total 28K
-rw-r--r--   1 nobody root 6.0K Jun 25 08:30 index.js
-rw-r--r--   1 nobody root 1.1K May 24 13:06 LICENSE
drwxr-xr-x 129 root   root 4.0K Jul  3 08:59 node_modules
-rw-r--r--   1 nobody root 3.4K Jul  3 08:59 package.json
-rw-r--r--   1 nobody root 3.4K Jun 25 08:30 README.md
drwxr-xr-x   5 nobody root  134 Jul  3 08:59 templates

Raw JSON at the top of the site

Hi,
I just picked up the plugin and found that it's giving a large blob of JSON sitting right at the top of the site. Not sure what's going on, but I'd be happy to give any more details if it helps.

screen shot 2017-08-22 at 10 35 09 pm

screen shot 2017-08-22 at 10 36 30 pm

api.raml.zip

An in-range update of eslint-config-standard is breaking the build 🚨

Version 10.2.1 of eslint-config-standard just got published.

Branch Build failing 🚨
Dependency eslint-config-standard
Current Version 10.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As eslint-config-standard is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Commits

The new version differs by 2 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

raml2html-slate-theme doesn't handle markdown in description

Markdown in description is handled as plain text.

Here is a fragment of RAML.

/users/{id}:
  get:
    queryParameters:
      foo:
        description: |
          blah, blah, blha
          * 1st item
          * 2nd item
        type: string
        required: false

raml2html-slate-theme generate the following.

screenshot

raml2html-slate-theme doesn't render description in responses examples

Hey,

just found out that this theme doesn't support description in examples: element. It do not render it.

responses:
  200:
    body:
      application/json:
        type: OrdersResponse
          examples:
            responseOne:
              description: Example response for response one.
              body: { ... }

This renders just response with OrdersResponse and return code and body.

Many thanks.

Cannot install NPM package

I wanted to give this a try, but cannot install the theme NPM package:

npm install -g raml2html-slate-theme

gives me ...

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "raml2html-slate-theme"
npm ERR! node v7.6.0
npm ERR! npm  v4.1.2

npm ERR! Cannot read property 'path' of null
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/wis3guy/Projects/foo-bar-baz/npm-debug.log

Unsure wether this has something to do with the NPM package ...

No type information are rendered

None of the type information are actually rendered. I tried JSON schema, XSD, and RAML data types, but don't see these information. Is this a bug or not yet implemented?

Empty HTML file generated

I'm using node v10.7.0 from Void Linux repository (musl instead of glibc). I installed raml2html and raml2html-slate-theme globally as per the instructions.

npm install -g raml2html
npm install -g raml2html-slate-theme

With this theme, the resulting HTML file is created, although with a length of 0 bytes. All the other themes from https://www.npmjs.com/search?q=keywords:raml2html-theme are producing the HTML file with content (except raml2html-werk-theme, which spews some template error).

This info must be very vague. What else can I provide?

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.