-
Notifications
You must be signed in to change notification settings - Fork 272
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
Kiota powered, in browser, client generation #3082
Conversation
Thank you for creating a pull request! Pinging @EricWittmann to respond or triage. |
<Form> | ||
<Grid hasGutter md={6}> | ||
<GridItem span={12}> | ||
<Label>[EXPERIMENTAL] This is "in-browser" generation of the client code using <a href="https://github.com/microsoft/kiota">Kiota</a>, please refer to |
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.
❤️
onSelect={this.onLanguageSelect} | ||
isOpen={this.state.languageIsExpanded} | ||
dropdownItems={[ | ||
<DropdownItem id="Java" key="Java" data-testid="form-type-auto"><i>Java</i></DropdownItem>, |
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.
may I suggest to sort them alphabetically? Also Kiota has a maturity matrix for languages, you might want to feature that too.
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.
done 👍
label="Client Class Name" | ||
fieldId="form-client-name" | ||
> | ||
<TextInput |
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.
I do think you should feature the include and exclude filters, or have some kind of endpoint selection mechanism. A big value proposition of Kiota is being able to generate specifically for the API surface the client cares about. Another aspect to that is that often some descriptions won't be the cleanest, and filtering out things that are failing is a quick way to get around and get things done.
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.
done 👍
}; | ||
} | ||
|
||
private doGenerate = async (): Promise<void> => { |
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.
from a UX perspective, having some kind of indication something is happening in the background would be helpful I think.
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.
agree, added a spinner 👍
@baywet thanks for the review! Also updated the Container image. |
This would also need documentation @smccarthy-ie 🙏 |
Now available in the Operate First environment: |
@andreaTP now that Kiota is (almost) integrated with apicurio, I'm wondering whether the search command from kiota should be able to sign-in and search an apicurio instance to go full circle? |
@baywet interesting idea! But I'm not 100% sure about how the integration can work here, a few questions:
A slightly diverging angle in the 2 projects is that Kiota concentrates on OpenAPI while here Registry does support a number of different formats, do you have any plan for supporting other/more formats or should the feature be limited only to OpenAPI? |
started a new discussion here to avoid side-tracking this PR. |
We should decide how to get this merged. It needs to be behind a feature flag at least. |
Do you wanna "hide" the feature or be able to completely get rid of the integration? |
Just hiding it is fine I think. Hidden by default (for now), with a config variable to enable it. Then we can set the config variable to enabled in Operate First. |
ccb8c8c
to
930b046
Compare
Sorry for the delayed feedback, the button is now behind a flag here: |
This is now green. Unless there are any objections, I'll merge this mid-next week. |
YaY! |
LGTM ready to merge |
Those changes are completely in the UI, you can check them out using this command:
The Kiota compilation to Wasm and the production of the relevant folder happens in this repository:
https://github.com/andreaTP/apicurio-client-gen-poc
we might want to make it more official if we want to fully support it.