-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update schema generate for 3rd party brokers #5083
base: mqtt-topic-metadata
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## mqtt-topic-metadata #5083 +/- ##
=======================================================
- Coverage 78.52% 78.38% -0.15%
=======================================================
Files 337 337
Lines 15779 15822 +43
Branches 3639 3653 +14
=======================================================
+ Hits 12391 12402 +11
- Misses 3388 3420 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK
Just the note about never sending broker.credentials back to the UI for the async api docs bit.
if (request.broker.credentials) { | ||
const creds = JSON.parse(request.broker.credentials) | ||
if (creds.username && creds.password) { | ||
schema.servers[request.broker.name].security = [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broker.credentials are never returned to the UI
There was talk of sending credentials.username
back, but not implemented at the moment.
@@ -1,6 +1,4 @@ | |||
module.exports = async function (app) { | |||
app.addHook('preHandler', app.verifySession) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this removed because it's already set somewhere earlier?
@@ -1,8 +1,6 @@ | |||
const schemaApi = require('./schema') | |||
|
|||
module.exports = async function (app) { | |||
app.addHook('preHandler', app.verifySession) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as in 3rdPartyBroker.js?
Closes #5082
Description
Adds support for asyncapi schema generation for 3rd party brokers.
metadata
model definition to provide custom get/set functions - consumers don't need to worry about JSON parse/stringify.