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

Issue with Javascript Petstore test #3

Closed
wing328 opened this issue May 12, 2018 · 2 comments
Closed

Issue with Javascript Petstore test #3

wing328 opened this issue May 12, 2018 · 2 comments

Comments

@wing328
Copy link
Member

wing328 commented May 12, 2018

Description

Got the following errors with JS tests:

  161 passing (1s)
  1 failing

  1) PetApi should create and get pet:
     Uncaught Error: expected undefined to be an instance of exports
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.a.Assertion.an (node_modules/expect.js/index.js:279:12)
      at Function.a (node_modules/expect.js/index.js:499:17)
      at test/api/PetApi.spec.js:72:20
      at src/ApiClient.js:493:9
      at Request.callback (node_modules/superagent/lib/node/index.js:668:14)
      at node_modules/superagent/lib/node/index.js:883:18
      at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
      at endReadableNT (_stream_readable.js:1056:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickCallback (internal/process/next_tick.js:180:9)

https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/javascript/test/api/PetApi.spec.js#L72

@wing328 wing328 added this to the 3.0.0 milestone May 12, 2018
@wing328
Copy link
Member Author

wing328 commented May 12, 2018

I noticed the issue. Will file a fix shortly.

@wing328
Copy link
Member Author

wing328 commented May 13, 2018

Fixed by #5

@wing328 wing328 closed this as completed May 13, 2018
wing328 pushed a commit that referenced this issue Jun 21, 2018
)

Motivation
-------------
Open API generator previously wasn't case sensitive when checking for reserved words in the typescript generator. This will allow us to have the "Package" model in ProductCatalogs without needing to rename anything.

Modifications
------------------
Duplicated the C# logic for reserved words (per the @jimschubert from openapitools' suggestion)
lukoyanov added a commit to lukoyanov/openapi-generator that referenced this issue Aug 27, 2018
lukoyanov added a commit to lukoyanov/openapi-generator that referenced this issue Aug 27, 2018
wing328 pushed a commit that referenced this issue Aug 28, 2018
* added play framework 2.6 support

* generated petstore sample

* generated petstore sample #2

* generated petstore sample #3

* Revert "generated petstore sample #3"

* generated petstore sample #4

* fixed circleci configs

* one more time samples regen
A-Joshi referenced this issue in ihsmarkitoss/openapi-generator Feb 27, 2019
* added play framework 2.6 support

* generated petstore sample

* generated petstore sample #2

* generated petstore sample #3

* Revert "generated petstore sample #3"

* generated petstore sample #4

* fixed circleci configs

* one more time samples regen
kuFEAR added a commit to kuFEAR/openapi-generator that referenced this issue May 27, 2020
kuFEAR added a commit to kuFEAR/openapi-generator that referenced this issue Jun 11, 2020
wing328 added a commit that referenced this issue Jun 16, 2020
…Body, Set List as default collection for Kotlin data class (#6456)

* Replace typeMapping kotlin.Array with kotlin.collections.List, because its doesn't work with Kotlin Data Classes(required manually implementing  hashCode&equals)
Replace typeMapping kotlin.Array<kotlin.Byte> with efficient primitive implementation kotlin.ByteArray
Replace instantiationTypes array to kotlin.collections.ArrayList, for extending Array we should provide element count to its constructor.

* Fixed path(removed slash on begin path) for Jvm Kotlin Retrofit

* Fixed handling optional bodyParams for Jvm Kotlin Retrofit

* Fix kotlin tests

* Fixed code format for detekt inspections #2

* revert formatting

* Added ability to generate optional @query params.

* Update Kotlin docs.

* Update Kotlin openapi3 client samples

* Update Kotlin client samples

* Update Kotlin openapi3 client samples after merge with master

* Revert hardcoding List instead Array

* Set List as default collectionType

* Update Kotlin samples

* Fixed Kotlin multiplatform api template. fix mapper for Array type.
Fixed Kotlin multiplatform api template Code style.

* Update Kotlin multiplatform sample

* Fix Kotlin multiplatform template code style

* Update Kotlin multiplatform sample

* Fix Kotlin multiplatform converting Array to List in Api.

* Update Kotlin multiplatform sample #3

* Fix Kotlin tests

* Fix Kotlin jackson Application.kt

* Fix Kotlin tests #2

* Fix merge conflict with master

* Generate samples after merge with master

* Generate samples after merge with master #2

* Generate samples after merge with master #3

* Generate samples after merge with master #4

* update kotlin samples

* update all samples

Co-authored-by: William Cheng <[email protected]>
kuFEAR added a commit to kuFEAR/openapi-generator that referenced this issue Oct 19, 2020
Thecrazyskull pushed a commit to Thecrazyskull/openapi-generator that referenced this issue Nov 13, 2020
Add support for multi level inheritance
justasm pushed a commit to justasm/openapi-generator that referenced this issue Jan 3, 2021
…y_conditional_generation

Kotlinx date library conditional generation
wing328 pushed a commit that referenced this issue Mar 19, 2021
…3&4 (#6916)

* Added supporting kotlin.serialization for jvm

* Added Serializable annotations for java types(date,time,url,uri etc.)

* Added SafeEnumSerializer

* Added StringBuilderAdapter for kotlin.serialization
Fix adapter naming
Fix Retrofit ApiClient.kt for kotlin.serialization

* Added StringBuilderAdapter for kotlin.serialization

* Switch sample to retrofit2-kotlin-serialization

* Add sample for retrofit2-kotlin.serialization

* update sample

* update sample

* update sample #3

* Fix enum quotes for kotlin.serialization

* update samples

* update pom.xml

* add pom.xml to child module

* fix kotlin-multiplatform freeCompilerArgs

* refactoring, add useSafeEnum option, remove safeEnum for kotlin.multiplatform

* update kotlin samples

* fix import kotlinx.serialization.Required

* Update kotlinx.serialization 1.0.0-rc-2, kotlin 1.4.10, retrofit-kotlinx-converter 0.7.0

* Update gradle wrapper 6.7-rc-3

* fix SafeEnum import

* fix Json initialization,
fix SafeEnumSerializer

* update samples

* update kotlinx.serialization to 1.0.0

* Update gradle to 6.7 in kotlin samples

* fixed adding @contextual for collections with non-primitive type elements

* remove unused SafeEnum imports, refactored

* update kotlin readme

* update kotlin project template Readme.md

* update samples for kotlin

* simplify template for class properties

* remove @contextual from kotlin-multiplatform

* update kotlin multiplatform dependencies

* refactoring templates

* revert all changes for multiplatform

* fix tests

* revert multiplatform #2

* update samples after merge, fix missed isListContainer->isArray

* fixed redundant space before @contextual

* Fixed enum template, Class were missed in generated samples

* fix enum template toString value->serialName

* fixed isEnum case for collections

* update samples

* removed useSafeEnum option, kotlinx serialization has out of box approach with coerceInputValues option for same behavior

* generate samples

* update kotlinx.serialization 1.0.1

* update samples

* Added pom.mustache template for kotlin-client samples with fixed execution of gradle wrapper instead standalone installed gradle on CI

* update samples with new pom.xml

* reverted enum value property name

* fixed kotlin-multiplatform pom.xml

* update kotlin-threetenbp sample

* update kotlin-string sample

* update kotlin-string sample

* fix adding kotlinx.serialization classpath to build.gradle

* generate samples

* add supporting kotlinx_serialization kotlinx.serialization.Serializable with java.io.Serializable at the same time

* update retrofit2-kotlinx-serialization-converter:0.8.0

* update kotlinx_serialization sample with retrofit2-kotlinx-serialization-converter:0.8.0

* apply suggest from @blendthink

* added proguard-rules.pro file for kotlinx.serialization on Android projects

* fix pom.mustache

* update gradle wrapper to 6.8.3

* update kotlin samples

* fix kotlin readme template, update kotlin samples

* update kotlin samples

* update kotlin sample
delete petstore/kotlin unit tests

* revert deletion kotlin client tests
remove adding pom.xml to kotlin client samples

* add support kotlinx serialization for okhttp3/4

* update kotlin client samples
wing328 pushed a commit that referenced this issue Jan 2, 2022
hanakslr pushed a commit to hanakslr/openapi-generator that referenced this issue May 27, 2022
nilskuhn pushed a commit to nilskuhn/openapi-generator that referenced this issue Apr 6, 2023
…encies

Pin dependency compare-versions to 3.4.0
fire pushed a commit to V-Sekai/openapi-generator that referenced this issue Jun 25, 2024
…jects

Inline objects, refacto, and experimental theading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants