Skip to content
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

docs: generating client sdk for openapi artifacts #3404

Merged
merged 2 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ include::{mod-loc}shared/all-attributes.adoc[]
//If the assembly covers a task, start the title with a verb in the gerund form, such as Creating or Configuring.

[role="_abstract"]
This chapter explains how to manage schema and API artifacts stored in {registry} by using the {registry} web console. This includes uploading and browsing {registry} content, and configuring optional rules for content:
This chapter explains how to manage schema and API artifacts stored in {registry} by using the {registry} web console. This includes uploading and browsing {registry} content, configuring optional rules for content, and generating client sdk code:

ifdef::apicurio-registry[]
* xref:configuring-registry-ui_{context}[]
endif::[]
* xref:browsing-artifacts-using-console_{context}[]
* xref:adding-artifacts-using-console_{context}[]
* xref:configuring-rules-using-console_{context}[]
* xref:configuring-settings-using-console_{context}[]
* xref:generating-client-sdk-using-web-console_{context}[]
* xref:changing-artifact-owner-using-console_{context}[]
* xref:configuring-settings-using-console_{context}[]
* xref:exporting-importing-using-web-console_{context}[]

//INCLUDES
Expand All @@ -26,6 +27,7 @@ endif::[]
include::{mod-loc}getting-started/proc-browsing-artifacts-using-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-adding-artifacts-using-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-configuring-rules-using-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-configuring-settings-using-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-generating-client-sdk-using-web-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-changing-artifact-owner-using-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-configuring-settings-using-console.adoc[leveloffset=+1]
include::{mod-loc}getting-started/proc-exporting-importing-using-web-console.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Metadata created by nebel
// ParentAssemblies: assemblies/getting-started/as_managing-registry-artifacts.adoc

[id="generating-client-sdk-using-web-console_{context}"]
= Generating client SDKs for OpenAPI artifacts using the {registry} web console

[role="_abstract"]
You can use the {registry} web console to configure, generate, and download client software development kits (SDKs) for OpenAPI artifacts. You can then use the generated client SDKs to build your client applications for specific platforms based on the OpenAPI.

{registry} generates client SDKs for the following programming languages:

* C#
* Go
* Java
* PHP
* Python
* Ruby
* Swift
* TypeScript

NOTE: Client SDK generation for OpenAPI artifacts runs in your browser only, and cannot be automated by using an API. You must regenerate the client SDK each time a new version of the artifact is added in {registry}.

.Prerequisites

* {registry} is installed and running in your environment.

* You are logged in to the {registry} web console:
+
`{registry-url}`

* An OpenAPI artifact has been added to {registry} using the web console, command line, Maven plug-in, or a Java client application.

.Procedure

. On the *Artifacts* tab, browse the list of artifacts stored in {registry}, or enter a search string to find a specific OpenAPI artifact. You can select from the list to search by criteria such as name, group, labels, or global ID.

. Click the OpenAPI artifact in the list to view its details.

. In the *Version metadata* section, click *Generate client SDK*, and configure the following settings in the dialog:

** *Language*: Select the programming language for which to generate the client SDK, for example, *Java*.
** *Generated client class name*: Enter the class name for the client SDK, for example, `MyJavaClientSDK.`
** *Generated client package name*: Enter the package name for the client SDK, for example, `io.my.example.sdk`

. Click *Show advanced settings* to configure optional comma-separated lists of path patterns to include or exclude:
** *Include path patterns*: Enter specific paths to include when generating the client SDK, for example, `\\**/.*, \**/my-path/*`. If this field is empty, all paths are included.
** *Exclude path patterns*: Enter specific paths to exclude when generating the client SDK, for example, `\**/my-other-path/*`. If this field is empty, no paths are excluded.
+
.Generate a Java client SDK in {registry} web console
image::images/getting-started/registry-web-console-client-sdk.png[Generate a Java client SDK in the registry web console]

. When you have configured the settings in the dialog, click *Generate and download*.

. Enter a file name for the client SDK in the dialog, for example, `my-client-java.zip`, and click *Save* to download.

[role="_additional-resources"]
.Additional resources
* {registry} uses Kiota from Microsoft to generate the client SDKs. For more information, see https://github.com/microsoft/kiota.
* For examples of how to get started with using the generated SDKs to build client applications, see https://learn.microsoft.com/en-us/openapi/kiota/quickstarts.