OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.48k stars 6.5k forks source link

[BUG][JAVASCRIPT] OneOfobjectobject is not generated in javascript #7246

Open bykof opened 4 years ago

bykof commented 4 years ago

Bug Report Checklist

Description

Generating JavaScript client with OneOf descriminator attribute resolves in unresolved import of

import OneOfobjectobject from './OneOfobjectobject';

The file OneOfobjectobject.js in the models modules does not exists.

openapi-generator version

4.3.1

OpenAPI declaration file content or url

https://gist.github.com/bykof/2eb09c0013410975f558595689a35729

Steps to reproduce
openapi-generator generate -i assets/full_documentation.json -g javascript -o .
june07 commented 3 years ago

Would be nice to get an update on this...

Running into the same issue. After running every permutation of javascript additional-options in a desperate attempt to get a working build, I still continue getting this:

npx @openapitools/openapi-generator-cli generate -i https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/doc/api/openapi.yaml -g javascript -o openapi

...

These relative modules were not found:

* ../model/OneOfintegerUUID in ./node_modules/peertube/openapi/dist/api/VideoRatesApi.js, ./node_modules/peertube/openapi/dist/api/VideosApi.js and 7 others
* ../model/OneOfintegerarray in ./node_modules/peertube/openapi/dist/api/VideosApi.js, ./node_modules/peertube/openapi/dist/api/VideoChannelsApi.js and 4 others
* ../model/OneOfobjectobject in ./node_modules/peertube/openapi/dist/api/PluginsApi.js
* ../model/OneOfstringarray in ./node_modules/peertube/openapi/dist/api/VideosApi.js, ./node_modules/peertube/openapi/dist/api/VideoChannelsApi.js and 4 others
* ../model/UNKNOWN_BASE_TYPE in ./node_modules/peertube/openapi/dist/api/PluginsApi.js

@bykof Were you able to find a solution to this?

Any help is greatly appreciated.

ichbinder commented 3 years ago

I have the same problem under Xcode.

mohammedlaslaa commented 3 years ago

Up ! I have the same issue with the @openapitools/openapi-generator-cli v2.1.23 If i want to define a schema like this :

schema: oneOf: