Giter VIP home page Giter VIP logo

swagger-repo's People

Contributors

adamaltman avatar androa avatar dependabot[bot] avatar esselius avatar frodeaa avatar ivangoncharov avatar knidarkness avatar marshevskyy avatar romanhotsiy avatar slavcodev avatar stasiukanya 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swagger-repo's Issues

Allow code samples in spec and in files?

Hello and thanks for all the hard work on this!

I'm curious why the build validates if all the code samples are either in the swagger.yml or in separate files? What was the motivation behind adding this check (the commit which added it didn't help: 32701eb)

https://github.com/Rebilly/swagger-repo/blob/868d52c2d17c9ceab83d58b1f31e495daaf7db4a/lib/index.js#L205

Could we define a precedence, e.g. code samples defined in files override those defined in the spec file, and then just merge them?

New version breaks when not using basedir

I was getting this error:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
In this new version the Path join is using the options basedir (in this line (209f827#diff-6d186b954a58d5bb740f73d84fe39073R306)) which is not the default command "build": "swagger-repo build -o web_deploy"

To make it run must use the -b option. Like this
swagger-repo build -o web_deploy -b spec

Dot in filename

Bug description

Seems like . can not be use in PATH.

For example:

  • '/users/{username}' is defined in a filename: users@{username}.yaml

But if we want to have users.whatever/{username} I dont know anyway to defined it correctly.
If the filename is users.whatever@{username}.yaml it will fail with:

> swagger-repo validate

Validating definition...
Failed OpenAPI3 schema validation:

undefined:
  1) #/ should be object but got undefined

Hide endpoint, (redocly.yaml is not working)

I need to hide some endpoints which are only for internal use. How can I do that?
I tried adding plugin and registered it with redocly.yaml but it is not working
Here is my redocly.yaml
# See https://redoc.ly/docs/cli/configuration/ for more information. apiDefinitions: main: openapi/openapi.yaml lint: extends: - recommended plugins: - './plugins/hider-plugin.js' decorators: hider/remove-internal-operations: error referenceDocs: htmlTemplate: ./docs/index.html theme: colors: primary: main: "red"

skip plugins is set as true

Hi
Thanks for this excellent project that you have open sourced.
i would like to use it and extend it for a tool that I am building.

In your index.js file the swaggerEditorMiddleware part has skipPlugins: true
Is there a way to override this?
Could you allow for some configuration here.

Thanks
Anshuman Das

Swagger Editor is not working

Error is shown in console when browsing /swagger-editor:

Refused to apply style from 'http://localhost:8080/swagger-editor.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
swagger-editor:43 GET http://localhost:8080/swagger-editor-bundle.js net::ERR_ABORTED 404 (Not Found)
swagger-editor:44 GET http://localhost:8080/swagger-editor-standalone-preset.js net::ERR_ABORTED 404 (Not Found)
swagger-editor:82 Uncaught ReferenceError: SwaggerEditorBundle is not defined
    at window.onload (swagger-editor:82)

It appears that some of the files are not being served and MIME type of css file is incorrect.

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.