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: IBM/openapi-validator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ibm-openapi-validator@1.32.1
Choose a base ref
...
head repository: IBM/openapi-validator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 24, 2025

  1. fix(ibm-api-symmetry): handle dictionaries and top-level schemas

    This rule was subject to both false positives, as it flagged any schema with a
    dictionary property (even when inappropriate), and false negatives, as it did
    not check top-level schemas, only schema properties. This fix resolves both
    issues and cleans up the rule logic on the whole.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Jan 24, 2025
    Copy the full SHA
    b771fd5 View commit details
  2. fix(ibm-api-symmetry): print info logs in coherent order

    The code to determine if one schema is a graph fragment of the other
    uses a depth-first algorithm that prints a log, if it determines the
    schema to violate the graph fragment pattern, with the reason behind
    the violation. Due to the depth-first nature of the algorithm, the
    logs are currently printed in depth first order, which is not as
    coherent for the user to read.
    
    This change introduces a stack to collect the logs during processing
    and print them in reverse order afterwards, to give the user a better
    sense of what happened during the processing.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Jan 24, 2025
    Copy the full SHA
    b341441 View commit details
  3. chore(release): 1.28.2 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.28.2](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.28.1...@ibm-cloud/openapi-ruleset@1.28.2) (2025-01-24)
    
    ### Bug Fixes
    
    * **ibm-api-symmetry:** handle dictionaries and top-level schemas ([b771fd5](b771fd5))
    * **ibm-api-symmetry:** print info logs in coherent order ([b341441](b341441))
    semantic-release-bot committed Jan 24, 2025
    Copy the full SHA
    38e64d9 View commit details
  4. chore(release): 1.32.2 [skip ci]

    ## ibm-openapi-validator [1.32.2](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.32.1...ibm-openapi-validator@1.32.2) (2025-01-24)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.28.2
    semantic-release-bot committed Jan 24, 2025
    Copy the full SHA
    8676a09 View commit details
  5. fix(ibm-use-date-based-format): tighten heuristic for flagging date-t…

    …ime values (#717)
    
    The regular expressions used to determine if a value should be considered a
    date-time value are too loose and allow false positives to sneak in. It's a
    tricky problem, but this commit makes an attempt to tighten them by dismissing
    the possibility of a date-time value if any letters are found that are not
    relevant to a date-time value.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Jan 24, 2025
    Copy the full SHA
    542d6b0 View commit details
  6. chore(release): 1.28.3 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.28.3](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.28.2...@ibm-cloud/openapi-ruleset@1.28.3) (2025-01-24)
    
    ### Bug Fixes
    
    * **ibm-use-date-based-format:** tighten heuristic for flagging date-time values ([#717](#717)) ([542d6b0](542d6b0))
    semantic-release-bot committed Jan 24, 2025
    Copy the full SHA
    55abee6 View commit details
  7. chore(release): 1.32.3 [skip ci]

    ## ibm-openapi-validator [1.32.3](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.32.2...ibm-openapi-validator@1.32.3) (2025-01-24)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.28.3
    semantic-release-bot committed Jan 24, 2025
    Copy the full SHA
    fe5f1af View commit details

Commits on Jan 27, 2025

  1. fix(typed-enum): modify spectral rule to look only at schemas (#719)

    This Spectral rule checks any object that has a type and enum field,
    regardless of whether it is in a valid schema location or not. This
    fix modifies the given paths to run the same functionality against
    schema objects only.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Jan 27, 2025
    Copy the full SHA
    4517084 View commit details
  2. chore(release): 1.28.4 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.28.4](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.28.3...@ibm-cloud/openapi-ruleset@1.28.4) (2025-01-27)
    
    ### Bug Fixes
    
    * **typed-enum:** modify spectral rule to look only at schemas ([#719](#719)) ([4517084](4517084))
    semantic-release-bot committed Jan 27, 2025
    Copy the full SHA
    ec12e34 View commit details
  3. chore(release): 1.32.4 [skip ci]

    ## ibm-openapi-validator [1.32.4](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.32.3...ibm-openapi-validator@1.32.4) (2025-01-27)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.28.4
    semantic-release-bot committed Jan 27, 2025
    Copy the full SHA
    a066e14 View commit details

Commits on Jan 30, 2025

  1. build: trigger docker workflow for new release

    Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
    padamstx committed Jan 30, 2025
    Copy the full SHA
    0e5f83b View commit details

Commits on Feb 1, 2025

  1. docs: purge 'qualitative' in favor of 'quality' for AQS docs (#721)

    Signed-off-by: Dan Hudlow <dhudlow@us.ibm.com>
    Dan Hudlow authored Feb 1, 2025
    Copy the full SHA
    1beb965 View commit details

Commits on Feb 4, 2025

  1. feat(ibm-valid-schema-example): introduce new validation rule

    Introduce a new rule for confirming that schema examples are
    valid instances of the schemas they are defined on.
    
    This replaces the Spectral rule 'oas3-valid-schema-example',
    which has reported a number of false positives across IBM APIs.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Feb 4, 2025
    Copy the full SHA
    d2f8071 View commit details
  2. fix(ibm-use-date-based-format): avoid false positives for mac address…

    …es (#723)
    
    This adjustment to the date-based value heuristic prevents a time from
    being detected if the word boundary is a colon character. This prevents
    colon-separated values that might otherwise look like dates, like MAC
    addresses, from being detected.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Feb 4, 2025
    Copy the full SHA
    357dfb2 View commit details
  3. fix(ibm-use-date-based-format): handle null example values (#724)

    Previously, if the example value given for a property was an explicit
    'null', this rule would crash the validator.
    
    This commit filters null examples from the logic so that they won't
    cause any trouble.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Feb 4, 2025
    Copy the full SHA
    e096b12 View commit details
  4. chore(release): 1.29.0 [skip ci]

    # @ibm-cloud/openapi-ruleset [1.29.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.28.4...@ibm-cloud/openapi-ruleset@1.29.0) (2025-02-04)
    
    ### Bug Fixes
    
    * **ibm-use-date-based-format:** avoid false positives for mac addresses ([#723](#723)) ([357dfb2](357dfb2))
    * **ibm-use-date-based-format:** handle null example values ([#724](#724)) ([e096b12](e096b12))
    
    ### Features
    
    * **ibm-valid-schema-example:** introduce new validation rule ([d2f8071](d2f8071))
    semantic-release-bot committed Feb 4, 2025
    Copy the full SHA
    edd2761 View commit details
  5. chore(release): 1.33.0 [skip ci]

    # ibm-openapi-validator [1.33.0](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.32.4...ibm-openapi-validator@1.33.0) (2025-02-04)
    
    ### Features
    
    * **ibm-valid-schema-example:** introduce new validation rule ([d2f8071](d2f8071))
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.29.0
    semantic-release-bot committed Feb 4, 2025
    Copy the full SHA
    a1e994d View commit details

Commits on Feb 7, 2025

  1. build(deps): bump spectral dependencies (#725)

    This resolves a CVE relating to JSONPath Plus.
    micael-mbagira-parloa authored Feb 7, 2025
    Copy the full SHA
    f367fd6 View commit details
  2. build(deps): resolve minor vulnerabilities with npm audit fix (#726)

    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Feb 7, 2025
    Copy the full SHA
    bbcf9bf View commit details
  3. fix(ibm-major-version-in-path): skip path checks if there are no paths (

    #727)
    
    * fix(ibm-major-version-in-path): skip path checks if there are no paths
    
    This rule checks both the `servers` entries and the path strings in an API
    definition. If an API definition contains no path strings in the `paths`
    object, this rule would return a false positive. This adds logic to skip
    the path string checks if there are none to check.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Feb 7, 2025
    Copy the full SHA
    c539741 View commit details
  4. chore(release): 1.29.1 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.29.1](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.29.0...@ibm-cloud/openapi-ruleset@1.29.1) (2025-02-07)
    
    ### Bug Fixes
    
    * **ibm-major-version-in-path:** skip path checks if there are no paths ([#727](#727)) ([c539741](c539741))
    semantic-release-bot committed Feb 7, 2025
    Copy the full SHA
    df2336a View commit details
  5. chore(release): 1.33.1 [skip ci]

    ## ibm-openapi-validator [1.33.1](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.33.0...ibm-openapi-validator@1.33.1) (2025-02-07)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.29.1
    semantic-release-bot committed Feb 7, 2025
    Copy the full SHA
    4256d79 View commit details

Commits on Feb 10, 2025

  1. docs: fix typo in ibm-string-attributes description (#728)

    This was rendering as:
    
    `do not define the code>pattern`
    
    Signed-off-by: Dustin Popp <dustinpopp@ibm.com>
    mriedem authored Feb 10, 2025
    Copy the full SHA
    3e7fec9 View commit details

Commits on Feb 12, 2025

  1. fix(build): add override for jsonpath-plus to avoid CVE (#729)

    Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
    padamstx authored Feb 12, 2025
    Copy the full SHA
    ef4f34d View commit details
  2. chore(release): 1.7.1 [skip ci]

    ## @ibm-cloud/openapi-ruleset-utilities [1.7.1](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset-utilities@1.7.0...@ibm-cloud/openapi-ruleset-utilities@1.7.1) (2025-02-12)
    
    ### Bug Fixes
    
    * **build:** add override for jsonpath-plus to avoid CVE ([#729](#729)) ([ef4f34d](ef4f34d))
    semantic-release-bot committed Feb 12, 2025
    Copy the full SHA
    e2dd16e View commit details
  3. chore(release): 1.29.2 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.29.2](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.29.1...@ibm-cloud/openapi-ruleset@1.29.2) (2025-02-12)
    
    ### Bug Fixes
    
    * **build:** add override for jsonpath-plus to avoid CVE ([#729](#729)) ([ef4f34d](ef4f34d))
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.7.1
    semantic-release-bot committed Feb 12, 2025
    Copy the full SHA
    0d0f820 View commit details
  4. chore(release): 1.33.2 [skip ci]

    ## ibm-openapi-validator [1.33.2](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.33.1...ibm-openapi-validator@1.33.2) (2025-02-12)
    
    ### Bug Fixes
    
    * **build:** add override for jsonpath-plus to avoid CVE ([#729](#729)) ([ef4f34d](ef4f34d))
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.29.2
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.7.1
    semantic-release-bot committed Feb 12, 2025
    Copy the full SHA
    2963851 View commit details

Commits on Feb 14, 2025

  1. build: fix exe build script

    This commit fixes the create-binaries.sh script
    by adding the "-t" (targets) option to explicitly
    specify the node versions for which the executables
    should be built.
    Because we haven't successfully published the executables
    in about 9 months (!), I also modified the semantic-release
    configuration so that we avoid the steps to build and publish
    the executables.  If we need to add this back later, it should
    be relatively easy since the create-binaries.sh script is now
    fixed.
    
    Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
    padamstx committed Feb 14, 2025
    Copy the full SHA
    7fdab47 View commit details

Commits on Mar 7, 2025

  1. build: bump jsonpath-plus to avoid CVE

    Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
    padamstx committed Mar 7, 2025
    Copy the full SHA
    06e6b10 View commit details

Commits on Mar 17, 2025

  1. fix(ibm-api-symmetry): loosen definition of graph fragment pattern (#732

    )
    
    Specifically, don't require that properties are omitted from a variant schema
    in order to consider it a proper graph fragment.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Mar 17, 2025
    Copy the full SHA
    018c2ca View commit details
  2. chore(release): 1.29.3 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.29.3](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.29.2...@ibm-cloud/openapi-ruleset@1.29.3) (2025-03-17)
    
    ### Bug Fixes
    
    * **ibm-api-symmetry:** loosen definition of graph fragment pattern ([#732](#732)) ([018c2ca](018c2ca))
    semantic-release-bot committed Mar 17, 2025
    Copy the full SHA
    dd51e85 View commit details
  3. chore(release): 1.33.3 [skip ci]

    ## ibm-openapi-validator [1.33.3](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.33.2...ibm-openapi-validator@1.33.3) (2025-03-17)
    
    ### Bug Fixes
    
    * **ibm-api-symmetry:** loosen definition of graph fragment pattern ([#732](#732)) ([018c2ca](018c2ca))
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.29.3
    semantic-release-bot committed Mar 17, 2025
    Copy the full SHA
    f01f04c View commit details

Commits on Mar 24, 2025

  1. fix(ibm-api-symmetry): handle dependencies between canonical and refe…

    …rence schemas (#733)
    
    Previously, if a canonical schema contained a reference to its corresponding
    reference schema, it would create an infinite cycle when the rule tried to
    resolve a reference schema into its corresponding canonical schema.
    
    This commit adds logic to detect that scenario and prevent the cycle.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Mar 24, 2025
    Copy the full SHA
    29ef3c7 View commit details
  2. chore(release): 1.29.4 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.29.4](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.29.3...@ibm-cloud/openapi-ruleset@1.29.4) (2025-03-24)
    
    ### Bug Fixes
    
    * **ibm-api-symmetry:** handle dependencies between canonical and reference schemas ([#733](#733)) ([29ef3c7](29ef3c7))
    semantic-release-bot committed Mar 24, 2025
    Copy the full SHA
    a8c1800 View commit details
  3. chore(release): 1.33.4 [skip ci]

    ## ibm-openapi-validator [1.33.4](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.33.3...ibm-openapi-validator@1.33.4) (2025-03-24)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.29.4
    semantic-release-bot committed Mar 24, 2025
    Copy the full SHA
    c060ca9 View commit details

Commits on Apr 7, 2025

  1. feat: add helpers to extract processed api from spectral context

    The Spectral 'context' object contains processed data about the
    OpenAPI definition being validated, including the resolved and
    unresolved versions of the definition and information about
    references. We use these objects in rule functions and they need
    to be extracted from deeply nested fields in the spectral context.
    Rather than always needing to remember or look up the fields,
    this commit allows us to use simple helper functions to get the
    data we need.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Apr 7, 2025
    Copy the full SHA
    47d3841 View commit details
  2. refactor: adjust code to use new spectral context utilities

    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 committed Apr 7, 2025
    Copy the full SHA
    1fbb88b View commit details
  3. chore(release): 1.8.0 [skip ci]

    # @ibm-cloud/openapi-ruleset-utilities [1.8.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset-utilities@1.7.1...@ibm-cloud/openapi-ruleset-utilities@1.8.0) (2025-04-07)
    
    ### Features
    
    * add helpers to extract processed api from spectral context ([47d3841](47d3841))
    semantic-release-bot committed Apr 7, 2025
    Copy the full SHA
    f5e338c View commit details
  4. chore(release): 1.30.0 [skip ci]

    # @ibm-cloud/openapi-ruleset [1.30.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.29.4...@ibm-cloud/openapi-ruleset@1.30.0) (2025-04-07)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.8.0
    semantic-release-bot committed Apr 7, 2025
    Copy the full SHA
    9b555a9 View commit details
  5. chore(release): 1.34.0 [skip ci]

    # ibm-openapi-validator [1.34.0](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.33.4...ibm-openapi-validator@1.34.0) (2025-04-07)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.30.0
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.8.0
    semantic-release-bot committed Apr 7, 2025
    Copy the full SHA
    8bf3233 View commit details

Commits on Apr 16, 2025

  1. fix: include response header content schemas in schema collection

    Signed-off-by: Dan Hudlow <dhudlow@us.ibm.com>
    Dan Hudlow authored and hudlow committed Apr 16, 2025
    Copy the full SHA
    739ccca View commit details
  2. test: add unit tests for utility collections

    Signed-off-by: Dan Hudlow <dhudlow@us.ibm.com>
    Dan Hudlow authored and hudlow committed Apr 16, 2025
    Copy the full SHA
    a35c192 View commit details
  3. chore(release): 1.8.1 [skip ci]

    ## @ibm-cloud/openapi-ruleset-utilities [1.8.1](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset-utilities@1.8.0...@ibm-cloud/openapi-ruleset-utilities@1.8.1) (2025-04-16)
    
    ### Bug Fixes
    
    * include response header content schemas in schema collection ([739ccca](739ccca))
    semantic-release-bot committed Apr 16, 2025
    Copy the full SHA
    29c74e5 View commit details
  4. chore(release): 1.30.1 [skip ci]

    ## @ibm-cloud/openapi-ruleset [1.30.1](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.30.0...@ibm-cloud/openapi-ruleset@1.30.1) (2025-04-16)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.8.1
    semantic-release-bot committed Apr 16, 2025
    Copy the full SHA
    15f9860 View commit details
  5. chore(release): 1.34.1 [skip ci]

    ## ibm-openapi-validator [1.34.1](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.34.0...ibm-openapi-validator@1.34.1) (2025-04-16)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.30.1
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.8.1
    semantic-release-bot committed Apr 16, 2025
    Copy the full SHA
    f3f6bd9 View commit details

Commits on Apr 23, 2025

  1. feat(openapi-ruleset-utilities): add type declaration files (#743)

    This allows the package to integrate with TypeScript-developed rulesets
    that need to rely on the utilities in this package.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored Apr 23, 2025
    Copy the full SHA
    e8c6a0e View commit details
  2. chore(release): 1.9.0 [skip ci]

    # @ibm-cloud/openapi-ruleset-utilities [1.9.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset-utilities@1.8.1...@ibm-cloud/openapi-ruleset-utilities@1.9.0) (2025-04-23)
    
    ### Features
    
    * **openapi-ruleset-utilities:** add type declaration files ([#743](#743)) ([e8c6a0e](e8c6a0e))
    semantic-release-bot committed Apr 23, 2025
    Copy the full SHA
    5ca4fd6 View commit details
  3. chore(release): 1.31.0 [skip ci]

    # @ibm-cloud/openapi-ruleset [1.31.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.30.1...@ibm-cloud/openapi-ruleset@1.31.0) (2025-04-23)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.9.0
    semantic-release-bot committed Apr 23, 2025
    Copy the full SHA
    e9ea6ee View commit details
  4. chore(release): 1.35.0 [skip ci]

    # ibm-openapi-validator [1.35.0](https://github.com/IBM/openapi-validator/compare/ibm-openapi-validator@1.34.1...ibm-openapi-validator@1.35.0) (2025-04-23)
    
    ### Dependencies
    
    * **@ibm-cloud/openapi-ruleset:** upgraded to 1.31.0
    * **@ibm-cloud/openapi-ruleset-utilities:** upgraded to 1.9.0
    semantic-release-bot committed Apr 23, 2025
    Copy the full SHA
    df8f213 View commit details

Commits on May 2, 2025

  1. fix(pagination-utils): recognize all json mime types

    The old code was inflexible with respect to content types other
    than 'application/json'. This commit adjusts the logic to use our
    utility for recognizing json mime types.
    
    Signed-off-by: Dustin Popp <dpopp07@gmail.com>
    dpopp07 authored and padamstx committed May 2, 2025
    Copy the full SHA
    51d0efd View commit details
Showing with 8,056 additions and 2,804 deletions.
  1. +1 −0 .eslintrc.js
  2. +1 −1 .github/pull_request_template.md
  3. +4 −4 .github/workflows/build.yaml
  4. +15 −4 .github/workflows/docker.yaml
  5. +2 −15 .releaserc
  6. +2 −2 .secrets.baseline
  7. +2 −2 docs/automated-quality-screening.md
  8. +178 −5 docs/ibm-cloud-rules.md
  9. +37 −1 docs/openapi-ruleset-utilities.md
  10. +2,750 −1,926 package-lock.json
  11. +6 −3 package.json
  12. +157 −0 packages/ruleset/CHANGELOG.md
  13. +11 −9 packages/ruleset/package.json
  14. +267 −225 packages/ruleset/src/functions/api-symmetry.js
  15. +2 −1 packages/ruleset/src/functions/collection-array-property.js
  16. +4 −2 packages/ruleset/src/functions/index.js
  17. +42 −2 packages/ruleset/src/functions/integer-attributes.js
  18. +30 −1 packages/ruleset/src/functions/{check-major-version.js → major-version-in-path.js}
  19. +75 −26 packages/ruleset/src/functions/operationid-naming-convention.js
  20. +135 −0 packages/ruleset/src/functions/redirect-response-body.js
  21. +5 −6 packages/ruleset/src/functions/request-and-response-content.js
  22. +7 −3 packages/ruleset/src/functions/resource-response-consistency.js
  23. +27 −16 packages/ruleset/src/functions/response-status-codes.js
  24. +5 −2 packages/ruleset/src/functions/schema-naming-convention.js
  25. +6 −2 packages/ruleset/src/functions/use-date-based-format.js
  26. +113 −0 packages/ruleset/src/functions/valid-schema-example.js
  27. +8 −5 packages/ruleset/src/ibm-oas.js
  28. +4 −1 packages/ruleset/src/rules/index.js
  29. +3 −3 packages/ruleset/src/rules/major-version-in-path.js
  30. +3 −0 packages/ruleset/src/rules/operationid-naming-convention.js
  31. +23 −0 packages/ruleset/src/rules/redirect-response-body.js
  32. +26 −0 packages/ruleset/src/rules/typed-enum.js
  33. +23 −0 packages/ruleset/src/rules/valid-schema-example.js
  34. +37 −7 packages/ruleset/src/utils/date-based-utils.js
  35. +14 −1 packages/ruleset/src/utils/pagination-utils.js
  36. +333 −78 packages/ruleset/test/rules/api-symmetry.test.js
  37. +209 −366 packages/ruleset/test/rules/array-attributes.test.js
  38. +101 −0 packages/ruleset/test/rules/integer-attributes.test.js
  39. +27 −1 packages/ruleset/test/rules/major-version-in-path.test.js
  40. +66 −36 packages/ruleset/test/rules/operationid-naming-convention.test.js
  41. +2 −3 packages/ruleset/test/rules/optional-request-body.test.js
  42. +371 −0 packages/ruleset/test/rules/redirect-response-body.test.js
  43. +36 −3 packages/ruleset/test/rules/response-status-codes.test.js
  44. +82 −0 packages/ruleset/test/rules/typed-enum.test.js
  45. +34 −0 packages/ruleset/test/rules/use-date-based-format.test.js
  46. +434 −0 packages/ruleset/test/rules/valid-schema-example.test.js
  47. +2 −0 packages/ruleset/test/test-utils/index.js
  48. +3 −2 packages/ruleset/test/test-utils/root-document.js
  49. +47 −0 packages/ruleset/test/test-utils/unit-test-rule.js
  50. +7 −1 packages/ruleset/test/utils/date-based-utils.test.js
  51. +1 −1 packages/ruleset/test/utils/pagination-utils.test.js
  52. +28 −0 packages/utilities/CHANGELOG.md
  53. +8 −5 packages/utilities/package.json
  54. +7 −2 packages/utilities/src/collections/index.js
  55. +2 −1 packages/utilities/src/utils/index.js
  56. +40 −0 packages/utilities/src/utils/spectral-context-utils.js
  57. +1,267 −0 packages/utilities/test/collections.test.js
  58. +42 −0 packages/utilities/test/spectral-context-utils.test.js
  59. +23 −0 packages/utilities/test/utils/test-rule-paths.js
  60. +3 −9 packages/utilities/test/utils/test-rule.js
  61. +1 −1 packages/utilities/test/validate-subschemas.test.js
  62. +23 −0 packages/utilities/tsconfig.json
  63. +16 −0 packages/utilities/types/collections/index.d.ts
  64. +1 −0 packages/utilities/types/collections/index.d.ts.map
  65. +67 −0 packages/utilities/types/index.d.ts
  66. +1 −0 packages/utilities/types/index.d.ts.map
  67. +17 −0 packages/utilities/types/utils/collect-from-composed-schemas.d.ts
  68. +1 −0 packages/utilities/types/utils/collect-from-composed-schemas.d.ts.map
  69. +9 −0 packages/utilities/types/utils/get-examples-for-schema.d.ts
  70. +1 −0 packages/utilities/types/utils/get-examples-for-schema.d.ts.map
  71. +10 −0 packages/utilities/types/utils/get-property-names-for-schema.d.ts
  72. +1 −0 packages/utilities/types/utils/get-property-names-for-schema.d.ts.map
  73. +137 −0 packages/utilities/types/utils/get-schema-type.d.ts
  74. +1 −0 packages/utilities/types/utils/get-schema-type.d.ts.map
  75. +54 −0 packages/utilities/types/utils/index.d.ts
  76. +1 −0 packages/utilities/types/utils/index.d.ts.map
  77. +12 −0 packages/utilities/types/utils/is-object.d.ts
  78. +1 −0 packages/utilities/types/utils/is-object.d.ts.map
  79. +16 −0 packages/utilities/types/utils/schema-has-constraint.d.ts
  80. +1 −0 packages/utilities/types/utils/schema-has-constraint.d.ts.map
  81. +10 −0 packages/utilities/types/utils/schema-has-property.d.ts
  82. +1 −0 packages/utilities/types/utils/schema-has-property.d.ts.map
  83. +15 −0 packages/utilities/types/utils/schema-loosely-has-constraint.d.ts
  84. +1 −0 packages/utilities/types/utils/schema-loosely-has-constraint.d.ts.map
  85. +15 −0 packages/utilities/types/utils/schema-path.d.ts
  86. +1 −0 packages/utilities/types/utils/schema-path.d.ts.map
  87. +11 −0 packages/utilities/types/utils/schema-requires-property.d.ts
  88. +1 −0 packages/utilities/types/utils/schema-requires-property.d.ts.map
  89. +26 −0 packages/utilities/types/utils/spectral-context-utils.d.ts
  90. +1 −0 packages/utilities/types/utils/spectral-context-utils.d.ts.map
  91. +40 −0 packages/utilities/types/utils/validate-composed-schemas.d.ts
  92. +1 −0 packages/utilities/types/utils/validate-composed-schemas.d.ts.map
  93. +47 −0 packages/utilities/types/utils/validate-nested-schemas.d.ts
  94. +1 −0 packages/utilities/types/utils/validate-nested-schemas.d.ts.map
  95. +48 −0 packages/utilities/types/utils/validate-subschemas.d.ts
  96. +1 −0 packages/utilities/types/utils/validate-subschemas.d.ts.map
  97. +231 −0 packages/validator/CHANGELOG.md
  98. +10 −10 packages/validator/package.json
  99. +2 −2 packages/validator/src/cli-validator/utils/get-copyright-string.js
  100. +10 −0 packages/validator/src/scoring-tool/rubric.js
  101. +2 −2 packages/validator/test/cli-validator/mock-files/oas3/clean-with-tabs.yml
  102. +2 −2 packages/validator/test/cli-validator/mock-files/oas3/clean.yml
  103. +2 −0 packages/validator/test/cli-validator/mock-files/oas3/component-path-example.yaml
  104. +2 −2 packages/validator/test/cli-validator/mock-files/oas31/clean.yml
  105. +2 −0 packages/validator/test/cli-validator/mock-files/oas31/component-path-example.yaml
  106. +1 −1 packages/validator/test/cli-validator/tests/error-handling.test.js
  107. +1 −1 scripts/create-binaries.sh
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ module.exports = {
{
singleQuote: true,
arrowParens: 'avoid',
trailingComma: 'es5',
},
],
'no-console': 0,
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ Please make sure that your PR fulfills the following requirements:
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] Dependencies have been updated as needed
- [ ] `.secrets.baseline` has been updated as needed
- [ ] `npm run generate-utilities-docs` has been run if any files in `packages/utilities/src` have been updated
- [ ] `npm run update-utilities` has been run if any files in `packages/utilities/src` have been updated

#### Checklist for adding a new validation rule:
- [ ] Added new validation rule definition (packages/ruleset/src/rules/*.js, index.js)
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
# semantic-release is also run to create a new release (if
# warranted by the new commits being built).

name: Build/Test/Publish
name: build

on:
push:
@@ -16,7 +16,7 @@ on:
jobs:
detect-secrets:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: Detect-Secrets
name: detect-secrets
runs-on: ubuntu-latest
strategy:
matrix:
@@ -46,8 +46,8 @@ jobs:
detect-secrets -v audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline
build:
name: build-test (node v${{ matrix.node-version }})
needs: detect-secrets
name: Build/Test (Node v${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
@@ -73,7 +73,7 @@ jobs:
publish-release:
needs: build
name: Semantic-Release
name: semantic-release
if: "github.ref_name == 'main' && github.event_name != 'pull_request'"
runs-on: ubuntu-latest

19 changes: 15 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -3,20 +3,31 @@
# job is separated from the publishing job, as it may fail independently and
# we need to be able to retry it without re-running the publish step.

name: Docker Deploy
name: docker

on:
release:
types: [created]
types:
- published
workflow_dispatch:
# Allow this workflow to be triggered manually

jobs:
deploy-docker-image:
name: Deploy image
deploy-image:
# We want to trigger this job ONLY for a published release
# related to the "ibm-openapi-validator" package.
name: deploy-image
if: "contains(github.ref_name, 'ibm-openapi-validator')"
runs-on: ubuntu-latest

steps:
# Display some info about the build for debugging purposes.
- name: Trigger info
run: |
echo "Build triggered by event: " ${{ github.event_name }}
echo " git ref: " ${{ github.ref }}
echo " git ref_name: " ${{ github.ref_name }}
- name: Checkout repository
uses: actions/checkout@v4

17 changes: 2 additions & 15 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
{
"branches": "main",
"branches": ["main"],
"debug": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
[
"@semantic-release/exec",
{
"publishCmd": "npm run pkg"
}
],
[
"@semantic-release/github",
{
"assets": [
"bin/*"
]
}
]
"@semantic-release/github"
]
}
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"files": "package-lock.json|^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-01-09T19:49:59Z",
"generated_at": "2025-03-06T22:00:57Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
@@ -106,7 +106,7 @@
}
]
},
"version": "0.13.1+ibm.56.dss",
"version": "0.13.1+ibm.62.dss",
"word_list": {
"file": null,
"hash": null
4 changes: 2 additions & 2 deletions docs/automated-quality-screening.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automated Qualitative Screening
# Automated Quality Screening

The validator provides Automated Qualitative Screening (AQS) scores via the `-q` (or
The validator provides Automated Quality Screening (AQS) scores via the `-q` (or
`--impact-score`) flag. These scores help you evaluate risk and make decisions about investing in
the quality of your service's API. AQS scores are not a substitute for expert review, but minimum
AQS scores may be a prerequisite to a review.
Loading