You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this did not generate the code in any different way. Then I followed the example some more and I think that it needs to support a certain interface:
am I correct so far ? Of course I would be more than happy to provide a PR that would add support for this but I feel that it may not be OK as then it would make ogen dependent on civil.Date. Plus, if somebody would like some other library it would clash. So should I simply create my own package that would .. sort of bind this together ?
Sorry if these questions seem dumb, it's just that I wasn't able to find much documentation, apart from one opened issue that adds support for decimals
Right now ogen decodes date types into time.Time objects (as documented) however because I am using a custom type for the format: "date" I end up having to cast from the custom type to time.Time and then extracting the date part so I thought I could just invest some time and figure out how to do it "properly" :D
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So I was reading about
x-ogen-typeproperty and found some examples in the repository:so then I tried to add civil.Date like so:
However this did not generate the code in any different way. Then I followed the example some more and I think that it needs to support a certain interface:
am I correct so far ? Of course I would be more than happy to provide a PR that would add support for this but I feel that it may not be OK as then it would make
ogendependent oncivil.Date. Plus, if somebody would like some other library it would clash. So should I simply create my own package that would .. sort of bind this together ?Sorry if these questions seem dumb, it's just that I wasn't able to find much documentation, apart from one opened issue that adds support for decimals
Right now ogen decodes date types into time.Time objects (as documented) however because I am using a custom type for the
format: "date"I end up having to cast from the custom type to time.Time and then extracting the date part so I thought I could just invest some time and figure out how to do it "properly" :Dkind regards and thank you for ogen!
Beta Was this translation helpful? Give feedback.
All reactions