Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Gi60s/openapi-enforcer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 72e13f2b91eef7fc8a6346bb12a485b675236472
Choose a base ref
...
head repository: Gi60s/openapi-enforcer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5f3718155e0e07f0f092374a5a6031353e03668f
Choose a head ref
  • 13 commits
  • 4 files changed
  • 2 contributors

Commits on Oct 6, 2022

  1. Bump nanoid from 3.1.25 to 3.3.1

    Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.25 to 3.3.1.
    - [Release notes](https://github.com/ai/nanoid/releases)
    - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
    - [Commits](ai/nanoid@3.1.25...3.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: nanoid
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 6, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    70fcdef View commit details

Commits on Dec 6, 2022

  1. Bump minimatch from 3.0.4 to 3.1.2

    Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
    - [Release notes](https://github.com/isaacs/minimatch/releases)
    - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
    - [Commits](isaacs/minimatch@v3.0.4...v3.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: minimatch
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 6, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    545a9c7 View commit details

Commits on Dec 7, 2022

  1. Bump qs from 6.5.2 to 6.5.3

    Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
    - [Release notes](https://github.com/ljharb/qs/releases)
    - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
    - [Commits](ljharb/qs@v6.5.2...v6.5.3)
    
    ---
    updated-dependencies:
    - dependency-name: qs
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 7, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0a0ba17 View commit details

Commits on Jan 7, 2023

  1. Bump json5 from 2.2.0 to 2.2.3

    Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
    - [Release notes](https://github.com/json5/json5/releases)
    - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
    - [Commits](json5/json5@v2.2.0...v2.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: json5
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7c59e96 View commit details

Commits on Mar 4, 2023

  1. Bump minimist from 1.2.5 to 1.2.8

    Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8.
    - [Release notes](https://github.com/minimistjs/minimist/releases)
    - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
    - [Commits](minimistjs/minimist@v1.2.5...v1.2.8)
    
    ---
    updated-dependencies:
    - dependency-name: minimist
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 4, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    59ea9d3 View commit details

Commits on May 5, 2023

  1. Merge pull request #147 from Gi60s/dependabot/npm_and_yarn/nanoid-3.3.1

    Bump nanoid from 3.1.25 to 3.3.1
    Gi60s authored May 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9965a03 View commit details
  2. Merge pull request #150 from Gi60s/dependabot/npm_and_yarn/minimatch-…

    …3.1.2
    
    Bump minimatch from 3.0.4 to 3.1.2
    Gi60s authored May 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7f13f2a View commit details
  3. Merge pull request #151 from Gi60s/dependabot/npm_and_yarn/qs-6.5.3

    Bump qs from 6.5.2 to 6.5.3
    Gi60s authored May 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f932cf5 View commit details
  4. Merge pull request #152 from Gi60s/dependabot/npm_and_yarn/json5-2.2.3

    Bump json5 from 2.2.0 to 2.2.3
    Gi60s authored May 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    04babdd View commit details
  5. Merge pull request #155 from Gi60s/dependabot/npm_and_yarn/minimist-1…

    ….2.8
    
    Bump minimist from 1.2.5 to 1.2.8
    Gi60s authored May 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0657d0c View commit details
  6. issue-156 tests

    Gi60s committed May 5, 2023
    Copy the full SHA
    66b8e6f View commit details
  7. 1.22.3

    Gi60s committed May 5, 2023
    Copy the full SHA
    10e6830 View commit details
  8. notes for 1.22.3

    Gi60s committed May 5, 2023
    Copy the full SHA
    5f37181 View commit details
Showing with 247 additions and 97 deletions.
  1. +8 −0 CHANGELOG.md
  2. +122 −96 package-lock.json
  3. +1 −1 package.json
  4. +116 −0 test/issues.test.js
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.22.3

### Security

- **Update Dependencies**

Updated some dependencies to address security vulnerabilities.

## 1.22.2

### Fixed
218 changes: 122 additions & 96 deletions package-lock.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openapi-enforcer",
"version": "1.22.2",
"version": "1.22.3",
"description": "Library for validating, parsing, and formatting data against open api schemas.",
"main": "index.js",
"directories": {
116 changes: 116 additions & 0 deletions test/issues.test.js
Original file line number Diff line number Diff line change
@@ -353,4 +353,120 @@ describe('documented issues fixes', () => {
})
});

describe.skip('issue-156 validate non-primitives in request query string', () => {
let def
let param
beforeEach(async () => {
param = {
name: 'arrayenums',
in: 'query',
schema: {
type: 'array',
items: {
type: 'string',
enum: ['Foo', 'Bar', 'Baz']
}
}
}
def = {
openapi: '3.0.0',
info: { title: '', version: 'v1' },
paths: {
'/foo': {
get: {
parameters: [param],
responses: {
200: { description: 'ok' }
}
}
}
}
}

})

it('will allow query string in path using exploded form style', async () => {
Object.assign(param, { explode: true, style: 'form' })
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo?arrayenums=Foo&arrayenums=Bar'
})
expect(req.query.arrayenums).to.deep.equal(['Foo', 'Bar'])
})

it('will allow query string in path using form style', async () => {
Object.assign(param, { explode: false, style: 'form' })
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo?arrayenums=Foo,Bar'
})
expect(req.query.arrayenums).to.deep.equal(['Foo', 'Bar'])
})

it('will allow query string in path using exploded space delimited style', async () => {
Object.assign(param, { explode: true, style: 'spaceDelimited' })
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo?arrayenums=Foo&arrayenums=Bar'
})
expect(req.query.arrayenums).to.deep.equal(['Foo', 'Bar'])
})

it('will allow query string in path using space delimited style', async () => {
Object.assign(param, { explode: false, style: 'spaceDelimited' })
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo?arrayenums=Foo%20Bar'
})
expect(req.query.arrayenums).to.deep.equal(['Foo', 'Bar'])
})

it('will allow query string in path using exploded pipe delimited style', async () => {
Object.assign(param, { explode: true, style: 'pipeDelimited' })
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo?arrayenums=Foo&arrayenums=Bar'
})
expect(req.query.arrayenums).to.deep.equal(['Foo', 'Bar'])
})

it('will allow query string in path using pipe delimited style', async () => {
Object.assign(param, { explode: false, style: 'pipeDelimited' })
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo?arrayenums=Foo|Bar'
})
expect(req.query.arrayenums).to.deep.equal(['Foo', 'Bar'])
})

it('will allow an array of strings in query map', async () => {
const [openapi] = await Enforcer(def, { hideWarnings: true, fullResult: true })
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo',
query: {
arrayenums: ['Foo', 'Bar']
}
})
expect(error).to.equal(undefined)
})

it('will allow a string of style form', async () => {
const [ req, error ] = openapi.request({
method: 'GET',
path: '/foo',
query: {
arrayenums: ['Foo', 'Bar']
}
})
expect(error).to.equal(undefined)
})
})

});