Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

klabast/openapi-reproducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Openapi Generator Reproducer

TL;DR

  1. Run the backend with

    ./mvnw clean quarkus:dev
  2. Check that uploading works by uploading this README.md for example:

    curl -X POST \
      http://localhost:8080/api/something/upload \
      -H "Content-Type: multipart/form-data" \
      -F "uploadFile=@README.md"
  3. In the frontend "project" run

    rm -rf ./src/api
    npm run openapi:codegen

    (don't forget npm i)

  4. You should now have a generated SomethingApiApi (no naming settings) that contains an objectToJSON function that is not declared anywhere

About

I think Openapi generator has a bug when dealing with Java/Kotlin/JVM in general (?) FileUpload types. This repo contains a very slim Quarkus/Kotlin project that exposes one multiform upload API.

When generating code (for a Svelte project) with typescript-fetch, there is a function objectToJSON that is not declared anywhere. The generated code therefore does not work.

You can check out openapi.json and Swagger, etc from http://localhost:8080/q/dev-ui when running the backend.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors