-
Notifications
You must be signed in to change notification settings - Fork 196
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
perf(apikey): add question model for api key #10267
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #10267 +/- ##
==========================================
+ Coverage 86.15% 86.20% +0.04%
==========================================
Files 442 442
Lines 25516 25555 +39
Branches 5009 5016 +7
==========================================
+ Hits 21984 22030 +46
+ Misses 1837 1831 -6
+ Partials 1695 1694 -1
|
296735f
to
b361fd0
Compare
@@ -7,9 +7,12 @@ import { TOOLS } from "../../core/globalVars"; | |||
import { QuestionNodes, questionNodes } from "../../question"; | |||
import { traverse } from "../../ui/visitor"; | |||
|
|||
export function QuestionMW(key: keyof QuestionNodes): Middleware { | |||
export function QuestionMW(key: keyof QuestionNodes, fromAction = false): Middleware { | |||
return async (ctx: HookContext, next: NextFunction) => { | |||
const inputs = ctx.arguments[0] as Inputs; |
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.
if fromAction is true, the inputs here is DriverContext, is there any issue if we use it as Inputs type?
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.
Seems no error when building and running. Do you think we need to mock an input and set platform, xxx into it?
@@ -293,6 +293,8 @@ | |||
"core.createProjectQuestion.apiSpecInputUrl.label": "Enter OpenAPI Description Document Location", | |||
"core.createProjectQuestion.OpenAIPluginDomain": "OpenAI Plugin Manifest", | |||
"core.createProjectQuestion.OpenAIPluginDomain.placeholder": "Enter your website domain or manifest URL", | |||
"core.createaProjectQuestion.ApiKey": "Client secret for Api key in OpenAPI spec", |
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.
Api -> API
spec -> specification
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.
Updated, thanks!
@@ -293,6 +293,8 @@ | |||
"core.createProjectQuestion.apiSpecInputUrl.label": "Enter OpenAPI Description Document Location", | |||
"core.createProjectQuestion.OpenAIPluginDomain": "OpenAI Plugin Manifest", | |||
"core.createProjectQuestion.OpenAIPluginDomain.placeholder": "Enter your website domain or manifest URL", | |||
"core.createaProjectQuestion.ApiKey": "Client secret for Api key in OpenAPI spec", | |||
"core.createProjectQuestion.invalidApiKey.message": "Client secret is invalid. Length of secret should >= 10 and <= 128", |
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.
Length -> The length
should -> should be
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.
Updated, thanks!
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.
revoke approval, ask for changes
No description provided.