Giter VIP home page Giter VIP logo

openapi-middleware's People

Contributors

danielgolub avatar dependabot[bot] avatar

Watchers

 avatar

openapi-middleware's Issues

feat: add cookie support for authentication

Is your feature request related to a problem? Please describe.
when securityScheme is the following:

securitySchemes:
  basicAuth:
    type: 'apiKey'
    in: 'cookie'
    name: 'cookieParam'

we throw an exception. need to add cookie support here including tests.

Describe the solution you'd like
Follow official spec: https://swagger.io/docs/specification/authentication/

Add it to the enum here:

in: {
type: 'string',
// TODO: add cookie support for security "in" property
eq: ['header', 'query'],
optional: true,
},

And also add respective test case here (another param for cookie):

apiKeyInQuery: { type: 'apiKey', in: 'query', name: 'authorizationQuery' },

Describe alternatives you've considered
N/A

Additional context
N/A

feat: support for security validators

Describe the bug
Missing support for security validators

To Reproduce
OpenAPI definition:

openapi: 3.0.0
info:
  title: Sample API
  description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
  version: 0.1.0
securitySchemes:
  basicAuth:
    type: 'http'
    scheme: 'basic'
paths:
  /greeting:
    get:
      summary: Returns a greeting for a guest.
      description: Sample endpoint that returns a greeting.
      operationId: greetingGuest
      security:
        - basicAuth: []
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                responseText:
                  type: string

Expected behavior
should be able to pass to config a handler for each securityScheme.

Desktop (please complete the following information):

  • OS: MacBook Pro
  • Node Version: 14.x / 16.x / 18.x

bug: add support for "multipleOf"

Describe the bug
multipleOf for numeric properties is not being validated

// TODO: multipleOf

To Reproduce
OpenAPI definition:

type: integer
multipleOf: 10

Expected behavior
Validate increments multiplied by the specified number

Desktop (please complete the following information):

  • OS: MacBook Pro
  • Node Version: 14.x, 16.x, 18.x

Additional context
Need to add custom validator to the openapi-schema-validator usage

feat: authentication with oauth2 / openIdConnect

Is your feature request related to a problem? Please describe.
Missing support for oauth2 / openIdConnect in security schemes.

Describe the solution you'd like
Need to add support here:

properties: {
type: {
type: 'string',
eq: [
'http', 'apiKey',
// TODO: add oauth2 + openIdConnect authentication type
// 'oauth2', 'openIdConnect'
],

Describe alternatives you've considered
N/A

Additional context
N/A

feat: JSDoc integration

Feature description
Missing JSDOC integration for easier development experience.
Consider adding GitHub Pages integration.

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.