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

Support for Duration, Date only, and Time only in Ruby #1644

Closed
6 tasks done
Tracked by #1049
baywet opened this issue Jun 23, 2022 · 2 comments · Fixed by #1765
Closed
6 tasks done
Tracked by #1049

Support for Duration, Date only, and Time only in Ruby #1644

baywet opened this issue Jun 23, 2022 · 2 comments · Fixed by #1765
Assignees
Labels
enhancement New feature or request fixed Ruby

Comments

@baywet
Copy link
Member

baywet commented Jun 23, 2022

OpenAPI describes and uses types that are generally not part of the standard types for the language runtime:

  • Duration: describes a duration (period) following ISO8601 durations
  • Time only: describes a time only information (like 4PM)
  • Date only: describes a date only information (like a birthdate)

For those type we should:

  • check whether the ruby runtime offers a standard type
  • check whether there are popular libraries offering an implementation as an alternative
  • wrap up the library types in our abstractions library (no need to wrap standard types)
  • add serialization/deserialization methods for parse node/serialization writer
  • update the implementation for json
  • update the ruby refiner to replace the reference to those types before generating the code

more details #1004 and associated PR

@baywet baywet added the Ruby label Jun 23, 2022
@baywet baywet added the enhancement New feature or request label Jun 23, 2022
@baywet
Copy link
Member Author

baywet commented Jul 15, 2022

example of work in the refiner

private static readonly Dictionary<string, (string, CodeUsing)> DateTypesReplacements = new (StringComparer.OrdinalIgnoreCase) {

@baywet
Copy link
Member Author

baywet commented Jul 15, 2022

example of types in Go (only if the native runtime doesn't support it and we need to bring a library onboard)
https://github.com/microsoft/kiota-abstractions-go/tree/main/serialization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed Ruby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants