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

Replace Kotlin lib with lib generated using openapi-codegen #1708

Open
wants to merge 52 commits into
base: main
Choose a base branch
from

Conversation

svix-mman
Copy link
Contributor

@svix-mman svix-mman commented Feb 11, 2025

TODO:

  • Generate high level API client
  • Switch to new low-level HTTP client (instead of old openapi-generator)
  • Generate models
    • structs
    • enums
    • nullable fields for *Patch
  • Delete all old openapi-generator code
  • Delete debug statements
  • Document breaking changes

Test coverage

  • Model de/serialization tests
    • Unset/Null/Some
    • DateTime RFC3339 and timezone
  • Retry logic
  • Headers: User-Agent and req-id / retry-count
  • {Operation}{Method}Options serialization tests
    • Headers
    • Query params
      • Enums
      • kotlinx.datetime.Instant
      • List
      • Bool
{
  "file-generated-at": "2025-02-11T17:13:24.932994316+00:00",
  "git-rev": "f0ca7dbb583fc10b32b936ce80e40260b0628472",
  "openapi-codegen-version": "0.1.0",
  "openapi.json-sha256": "27c305c4c890291e9dd2506cebe18422317faea9963f3d9abf89a405731e3206"
}

ref:

@svix-mman
Copy link
Contributor Author

Open source review

kotlinx.serialization

  • Apache-2.0 license
  • Written and maintained by Kotlin

A serialization lib, will allow us to drop https://github.com/square/moshi

@svix-mman svix-mman force-pushed the mendy/new-kotlin-lib branch from 6c4d1da to bd747da Compare February 12, 2025 22:17
@svix-mman
Copy link
Contributor Author

Open source review

wiremock

  • Apache-2.0 license

Allows me to easily test the API client

@svix-mman svix-mman force-pushed the mendy/new-kotlin-lib branch from 6ed68f7 to 8aef5c3 Compare February 13, 2025 03:02
@svix-mman svix-mman marked this pull request as ready for review February 13, 2025 03:07
@svix-mman svix-mman requested a review from a team as a code owner February 13, 2025 03:07
ChangeLog.md Outdated Show resolved Hide resolved
ChangeLog.md Show resolved Hide resolved
svix-james
svix-james previously approved these changes Feb 13, 2025
@svix-mman svix-mman force-pushed the mendy/new-kotlin-lib branch from dc01f73 to 322d6d1 Compare February 13, 2025 16:23
ChangeLog.md Outdated Show resolved Hide resolved
ChangeLog.md Outdated Show resolved Hide resolved
Comment on lines -99 to +86
@Deprecated(message = "This endpoint is deprecated.")
@Deprecated("")
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional that we are not using a deprecation message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet supported by our codegen

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

Successfully merging this pull request may close these issues.

3 participants