Code Monkey home page Code Monkey logo

api2html's People

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

api2html's Issues

Properties aren't being lifted for schemas

Let's say that I have a schema defined in my OpenAPI spec:

  user:
    properties:
      id:
        type: string
        format: uuid
      login:
        type: string
        format: email
      password:
        type: string
        format: password

I would expect in the generated HTML to include only the properties, so basically this:

{
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "login": {
      "type": "string",
      "format": "email"
    },
    "password": {
      "type": "string",
      "format": "password"
    },
}

However, it is rendering with the higher level fields:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "login": {
      "type": "string",
      "format": "email"
    },
    "password": {
      "type": "string",
      "format": "password"
    }
  }
}

You can also see this happening the example you link to in the README: https://tobilg.github.io/api2html/petstore/#schemas

Restrictions always none

Hi
I am using this tool to generate a swagger 2 api document, but I cannot see any Restrictions in the generated html.
I added minLength, maxLength, I think these are restrictions.

Is this a bug? Can you give some suggestions for this problem?

Don't see how to use customCss

Hey there!

Just trying this out on a project I am firing up and it's working pretty great!

One requirement I have is to add some custom CSS (or even Sass). Currently the customCss flag appears to be a boolean value of true, which is passed through to shins.

According to the shins docs

Setting customCss to true will include the pub/css/screen_overrides.css,pub/css/print_overrides.css and pub/css/theme_override.css files, in which you can override any of the default Slate theme, to save you from having to alter the main css files directly. This should make syncing up with future Shins / Slate releases easier.

But we don't have any way to access these files as they are in node_modules using this tool.

How do I inject customCss?

Thanks!

combine schemas not working in 'paths'

combining schemas in path is not working
e.g.

paths:
  /pets:
    patch:
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/Cat'
                - $ref: '#/components/schemas/Dog'

but it's working in

components:
  schemas:
  ...

Appending requestBody to curl samples

Hello! First of all, thanks for this awesome package! It's just so really helpful in producing excellent API documentation.

I just wanted to reach out to ask if there's a way I can append the form-data params to the curl examples. Right now, requestBody that are of multi-part form data and application/json content types show in the curl samples if httpsnippet and experimental options are hardcoded to true, but not params with x-www-form-urlencoded content-type. Any help is much appreciated.

Thank you in advance!

Suggestions and a question

Hi Tobi:

Thanks for maintaining this project!

I see reason to add several new arguments to pass on to shins.render() like, layout, etc. and maybe a verbose option to log which options were recognized and being passed on to the converter and the renderer. Any/all would be helpful.

In looking at the command line argument definitions, in the current version, you have two -s options, although the -- options are different. That might be worth fixing.

Also, do you when the current version would be synced with npm? Seems like the customcss option isn't out there yet.

Thanks,

Matt

How to use --theme

I am trying to use the --theme option.
I cant see any error but i cant see any visual difference.
Where is my error?

api2html -o ./dist/api.html --languages http,javascript,javascript--nodejs --theme idea ./dist/api.yaml

Thank you

Update npm package

I noticed the customLogoUrl CLI option isn't available on the NPM package that is published. Just curious when this might be available.

Thanks!

Ability to specify Widdershins environment/config file

Is there a way to specify a Widdershins config file, used by --environment? There are a number of things that would be nice to specify and have passed on to Widdershins without having to have api2html support every single thing Widdershins supports.

Update NPM package

Hello,

Since you merged our PRs, don't forget to update/republish the npm package.
Cheers :)

theme question

edit: my bad on the error, -theme needs to be --theme

Also, it's not clear if there's a way to change the .toc-wrapper / dark parts of the theme? I'm assuming "theme" is just the middle section?

Example language typescript

Hello!
Thank you for this great project.

Is it possible to generate examples for Typescript? (eg. -l typescript)

Greetings!

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.