Skip to content

Conversation

@klajmajk
Copy link
Member

@klajmajk klajmajk commented Jan 9, 2026

@marcel-ouska2

  1. had to fix the proxy as it did not work for me check if it is ok.
  2. nothing seems to use generated methods from /src/base/openapi/generated-api/*

@gemini-code-assist
Copy link

Summary of Changes

Hello @klajmajk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing the process definition deployment API and refining the local development environment. It updates the OpenAPI specification to correctly handle binary BPMN file uploads via multipart/form-data and modifies the client-side code to align with this new API contract. Additionally, it includes adjustments to the Vite development server's proxy configuration and refactors some OpenAPI parameter definitions for better reusability.

Highlights

  • API Specification Update: The OpenAPI specification for deploying process definitions has been updated to accept binary BPMN files via multipart/form-data instead of application/xml.
  • Local Development Proxy Configuration: The Vite development server's proxy configuration has been adjusted, changing the proxied path from /api to /v1 and removing the path rewrite rule.
  • Client-Side API Integration: The client-side createProcessDefinition function has been refactored to align with the new OpenAPI specification, converting XML input to a Blob for multipart/form-data upload using the generated API client.
  • OpenAPI Parameter Refactoring: Sorting parameters in the OpenAPI specification have been refined, including an update to the sortField enum and the extraction of sortOrder into a reusable component.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the process definition deployment to use multipart/form-data, which is appropriate for file uploads. It also includes a beneficial refactoring of the OpenAPI specification and a fix for the Vite development server proxy. My review focuses on improving the efficiency of an API call, ensuring consistency with the API specification, and cleaning up configuration files.

Comment on lines 87 to 102
export const createProcessDefinition = async (xml: string): Promise<ProcessDefinitionDetail> => {
const response = await AXIOS_INSTANCE.post<ProcessDefinitionDetail>('/process-definitions', xml, {
headers: { 'Content-Type': 'application/xml' },
});
return response.data;
// Convert XML string to Blob
const blob = new Blob([xml], { type: 'application/xml' });

// Create request body for the generated client
const requestBody: CreateProcessDefinitionBody = {
resource: blob
};

// Call the generated client
const response = await createProcessDefinitionApi(requestBody);
const processDefinitionKey = response.processDefinitionKey;

const detailResponse = await getProcessDefinition(processDefinitionKey);
return detailResponse;
};

Choose a reason for hiding this comment

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

high

This implementation makes two separate API calls: one to create the process definition and another to fetch its details. This is inefficient. To improve performance, consider modifying the backend POST /process-definitions endpoint to return the complete ProcessDefinitionDetail object upon successful creation. This would eliminate the need for the second getProcessDefinition call.

});
return response.data;
// Convert XML string to Blob
const blob = new Blob([xml], { type: 'application/xml' });

Choose a reason for hiding this comment

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

medium

The Blob is created with type: 'application/xml', but the OpenAPI specification for this endpoint (openapi/api.yaml line 497) specifies contentType: application/octet-stream for the resource part. While BPMN files are XML-based, it's best to align with the API contract to prevent potential issues.

Suggested change
const blob = new Blob([xml], { type: 'application/xml' });
const blob = new Blob([xml], { type: 'application/octet-stream' });

target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/v1'),
// rewrite: (path) => path.replace(/^\/api/, '/v1'),

Choose a reason for hiding this comment

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

medium

This commented-out rewrite function is no longer needed with the new proxy configuration. It should be removed to improve code clarity and maintainability.

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