-
Notifications
You must be signed in to change notification settings - Fork 43
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 id Properties #54
Comments
I think there is value in having other concrete types like |
For example, I would like to use plank to generate objects for use in Texture, and sometimes these objects have a |
@Adlai-Holler - currently we offer things like serialization, copying support for all properties, how do you propose handling this in the case of |
Also what would the value of |
@Adlai-Holler @rahul-malik I think we'd likely make use of this in our composer rewrite |
For serialization, I think we could start with not serializing it. I don't know what the extensibility rules for JSON schema are, but maybe we could offer a hatch like, throwing this out there, The bigger question is whether plank is/should be suitable for generating non-serialized plain-old-NS-objects for use inside the app, or if it should be specialized for talking with a server. Texture, for example, could make great use of a solid ObjC code generator. |
The main question for me is does it make sense to create types with properties of unknown types. I think The only thing that is JSON / Server specific currently is the assumption that dictionaries always use That said, I think there is probably value in having a way to have users declare type extensions outside of the ones listed in JSONSchema and it would be up to them to declare what the corresponding type is for each supported language they wish to generate. |
What about treat those cases similar to how Plank deals with The JSON value could be "any" string and with format you would define what kind of class it should be. This way the responsibility would be up to each developer and not to Plank itself. |
@Adlai-Holler - working on a proposal to allow custom type extensions making plank a whole lot more flexible. I’ll forward when I have something to review |
I'd like to use
plank
for generating models for use inside an app i.e. no JSON parsing, and it'd be great to be able to specify@property id myThing
and@property UIColor *myColor
.Is anyone else interesting in this capability?
The text was updated successfully, but these errors were encountered: