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

Add a Kiota generated Java SDK #50

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andreaTP
Copy link

@andreaTP andreaTP commented Feb 6, 2024

Hi @kfcampbell and @nickfloyd 👋 ,

after the work we have done in Kiota on Java it would be great to start distributing a Java SDK 😄
Here I started to spearhead the effort, but it will require some help on your side to be finalized, e.g. creating the java-sdk repository.

The generated code can be compiled using Maven with a minimal pom.xml like:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.github.api</groupId>
    <artifactId>github-java-sdk</artifactId>
    <version>0.0.1</version>
    <properties>
        <kiota.libs.version>0.12.1</kiota.libs.version>
        <jakarta.annotation.version>2.1.1</jakarta.annotation.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.microsoft.kiota</groupId>
            <artifactId>microsoft-kiota-abstractions</artifactId>
            <version>${kiota.libs.version}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>${jakarta.annotation.version}</version>
        </dependency>
    </dependencies>
</project>

Happy to answer any questions and assist in the process!

@andreaTP
Copy link
Author

andreaTP commented Feb 6, 2024

cc. @baywet

Copy link

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! A couple of comments.

Comment on lines +35 to +37
- name: Install kiota
run: dotnet tool install --global Microsoft.OpenApi.Kiota --prerelease

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Install kiota
run: dotnet tool install --global Microsoft.OpenApi.Kiota --prerelease

Comment on lines +27 to +29
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x.x'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x.x'
- uses: microsoft/[email protected]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to go in the direction you are proposing, but, currently, the installation of the tools is based on dotnet tool install, if we move to the specific GH Action it would be best to update all of the jobs.
Looking for the maintainers of this project guidance here.

-d schemas/downloaded.json \
--serializer none \
--deserializer none \
--exclude-path "/repos/{template_owner}/{template_repo}/generate" \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc. @baywet this seems to be a viable workaround for microsoft/kiota#4151 I think we should apply it to the Go generation script as it's affected too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants