Skip to content

Commit

Permalink
Merge branch 'next' into feature/cpp-app-passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
ksentak committed Jul 18, 2024
2 parents 7d44dbc + b34fff1 commit 2609ea1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [3.0.0-next.7](https://github.com/rdkcentral/firebolt-openrpc/compare/v3.0.0-next.6...v3.0.0-next.7) (2024-07-10)


### Bug Fixes

* Added x-response-name in EventTag ([#200](https://github.com/rdkcentral/firebolt-openrpc/issues/200)) ([d2130a8](https://github.com/rdkcentral/firebolt-openrpc/commit/d2130a8bfa88a4a43c033596c9a8aa4d7b1864fa))

# [3.0.0-next.6](https://github.com/rdkcentral/firebolt-openrpc/compare/v3.0.0-next.5...v3.0.0-next.6) (2024-07-10)


### Bug Fixes

* SchemasMatch handling null ([#199](https://github.com/rdkcentral/firebolt-openrpc/issues/199)) ([07c47db](https://github.com/rdkcentral/firebolt-openrpc/commit/07c47db16ca2a533ee29e6586703834658928bc4))

# [3.0.0-next.5](https://github.com/rdkcentral/firebolt-openrpc/compare/v3.0.0-next.4...v3.0.0-next.5) (2024-06-13)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebolt-js/openrpc",
"version": "3.0.0-next.5",
"version": "3.0.0-next.7",
"description": "The Firebolt SDK Code & Doc Generator",
"main": "languages/javascript/src/sdk.mjs",
"type": "module",
Expand Down
12 changes: 6 additions & 6 deletions src/validate/validator/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const addFailingMethodSchema = (error, json, schema) => {
const i = parseInt(error.schemaPath.split("/")[2])
error.params.failingSchema = schema.definitions.Method.allOf[i].then.$ref
}
}

}
}
}

Expand All @@ -61,7 +61,7 @@ export const pruneErrors = (errors = []) => {

Object.values(groups).forEach( group => {
const paths = []
pruned.push(group.sort( (a, b) => b.schemaPath.split('/').length - a.schemaPath.split('/').length ).pop())
pruned.push(group.sort( (a, b) => b.schemaPath.split('/').length - a.schemaPath.split('/').length ).pop())
})

return pruned
Expand Down Expand Up @@ -163,7 +163,7 @@ export const validate = (json = {}, schemas = {}, ajv, validator, additionalPack
validator.errors.forEach(error => error.source = 'OpenRPC')

errors.push(...pruneErrors(validator.errors))
}
}

return { valid: valid, title: json.title || json.info.title, errors: errors }
}
Expand Down Expand Up @@ -235,7 +235,7 @@ export const validatePasshtroughs = (json) => {

if (!schemasMatch(source, destination)) {
const properties = getPropertiesInSchema(destination, json)

// follow $refs so we can see the schemas
source = getPropertySchema(source, '.', json)
destination = getPropertySchema(destination, '.', json)
Expand Down Expand Up @@ -276,4 +276,4 @@ export const validatePasshtroughs = (json) => {

return result

}
}

0 comments on commit 2609ea1

Please sign in to comment.