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

fix!: add csharp support for DateTime, TimeSpan, Guid #1612

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

jano-petras
Copy link
Contributor

Description

Extending supported string formats for C#:

  • format: 'date-time' will be rendered as DateTime in C#
  • format: 'time' will be rendered as TimeStamp in C#
  • format: 'uuid' will be rendered as Guid in C#

Added relevant tests and extended existing examples where relevant

Related issue(s)
Resolves #1607

Copy link

netlify bot commented Nov 16, 2023

Deploy Preview for modelina canceled.

Name Link
🔨 Latest commit 2e936c3
🔍 Latest deploy log https://app.netlify.com/sites/modelina/deploys/6557507874e7770008bb2ba3

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@jano-petras jano-petras changed the title Add csharp support for DateTime, TimeSpan, Guid #1607 fix: Add csharp support for DateTime, TimeSpan, Guid Nov 16, 2023
@jano-petras jano-petras changed the title fix: Add csharp support for DateTime, TimeSpan, Guid fix: add csharp support for DateTime, TimeSpan, Guid Nov 16, 2023
@jonaslagoni jonaslagoni changed the title fix: add csharp support for DateTime, TimeSpan, Guid fix!: add csharp support for DateTime, TimeSpan, Guid Nov 16, 2023
Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

Nice @jano-petras!

Just need to run npm run lint:fix and add a small section in the migration docs about this breaking change for the C# models: https://github.com/asyncapi/modelina/blob/next/docs/migrations/version-2-to-3.md

Everything else is good 👌

Copy link

sonarcloud bot commented Nov 17, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
49.4% 49.4% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@jano-petras
Copy link
Contributor Author

Thanks @jonaslagoni, that has been addressed now

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

Awesome @jano-petras 🔥

@jonaslagoni
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 3aa1026 into asyncapi:next Nov 17, 2023
17 of 18 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 3.0.0-next.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jonaslagoni
Copy link
Member

@all-contributors please add @jano-petras for code, docs, test

Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @jano-petras! 🎉

jonaslagoni added a commit that referenced this pull request Feb 1, 2024
* feat!: convert to use multi parser (#1587)
* feat!: adds support for duration in java (#1604)
* feat: enable AsyncAPI v3 (#1600)
* fix!: add csharp support for DateTime, TimeSpan, Guid (#1612)
* feat!: adds extend in common, meta, and constrained models (#1613)
* feat!: adds inheritance with interfaces for java (#1593)
* chore: remove duplicate version entry for AsyncAPI processor (#1609)
* feat!: render python union in pydantic in the pre 3.10 way (#1626)
* feat: add file path as input (#1601)
* feat!: add options as parameter to constraints (#1667)
* fix: (un)marshalling tuple and dictionary unwrapping for Typescript (#1717)
* fix: jsonbinpack preset and runtime tests (#1718)
* chore: fix linting
* chore: remove unused directory
* feat!: add useJavascriptReservedKeywords option for TS (#1727)
* feat: enable raw properties for interface (#1729)
* fix: newtonsoft could not handle enum values (#1731)
* chore: update Java runtime tests (#1739)
* fix: edge case where references was incorrect handled for JSON Schema (#1754)
* fix: recursion bug for get nearest dependencies (#1757)

---------

Co-authored-by: Kenneth Aasan <[email protected]>
Co-authored-by: jano-petras <[email protected]>
Co-authored-by: Nilkanth Parmar <[email protected]>
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 4.0.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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