{"action":"created","issue":{"url":"https://api.github.com/repos/justanr/marshmallow-annotations/issues/4","repository_url":"https://api.github.com/repos/justanr/marshmallow-annotations","labels_url":"https://api.github.com/repos/justanr/marshmallow-annotations/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/justanr/marshmallow-annotations/issues/4/comments","events_url":"https://api.github.com/repos/justanr/marshmallow-annotations/issues/4/events","html_url":"https://github.com/justanr/marshmallow-annotations/pull/4","id":318743794,"number":4,"title":"Build schema fields from plain annotated class.","user":{"login":"justanr","id":4221605,"avatar_url":"https://avatars2.githubusercontent.com/u/4221605?v=4","gravatar_id":"","url":"https://api.github.com/users/justanr","html_url":"https://github.com/justanr","followers_url":"https://api.github.com/users/justanr/followers","following_url":"https://api.github.com/users/justanr/following{/other_user}","gists_url":"https://api.github.com/users/justanr/gists{/gist_id}","starred_url":"https://api.github.com/users/justanr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justanr/subscriptions","organizations_url":"https://api.github.com/users/justanr/orgs","repos_url":"https://api.github.com/users/justanr/repos","events_url":"https://api.github.com/users/justanr/events{/privacy}","received_events_url":"https://api.github.com/users/justanr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"justanr","id":4221605,"avatar_url":"https://avatars2.githubusercontent.com/u/4221605?v=4","gravatar_id":"","url":"https://api.github.com/users/justanr","html_url":"https://github.com/justanr","followers_url":"https://api.github.com/users/justanr/followers","following_url":"https://api.github.com/users/justanr/following{/other_user}","gists_url":"https://api.github.com/users/justanr/gists{/gist_id}","starred_url":"https://api.github.com/users/justanr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justanr/subscriptions","organizations_url":"https://api.github.com/users/justanr/orgs","repos_url":"https://api.github.com/users/justanr/repos","events_url":"https://api.github.com/users/justanr/events{/privacy}","received_events_url":"https://api.github.com/users/justanr/received_events","type":"User","site_admin":false},"assignees":[{"login":"justanr","id":4221605,"avatar_url":"https://avatars2.githubusercontent.com/u/4221605?v=4","gravatar_id":"","url":"https://api.github.com/users/justanr","html_url":"https://github.com/justanr","followers_url":"https://api.github.com/users/justanr/followers","following_url":"https://api.github.com/users/justanr/following{/other_user}","gists_url":"https://api.github.com/users/justanr/gists{/gist_id}","starred_url":"https://api.github.com/users/justanr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justanr/subscriptions","organizations_url":"https://api.github.com/users/justanr/orgs","repos_url":"https://api.github.com/users/justanr/repos","events_url":"https://api.github.com/users/justanr/events{/privacy}","received_events_url":"https://api.github.com/users/justanr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-29T19:44:22Z","updated_at":"2018-04-29T19:52:09Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/justanr/marshmallow-annotations/pulls/4","html_url":"https://github.com/justanr/marshmallow-annotations/pull/4","diff_url":"https://github.com/justanr/marshmallow-annotations/pull/4.diff","patch_url":"https://github.com/justanr/marshmallow-annotations/pull/4.patch"},"body":"* Generates fields from class level annotations\r\n* Ignores ClassVar annotations\r\n* Handles Optional/Union[T, None] by generating allow_none in the field options\r\n* Allows registration/overriding of type to field definitions (Registration is provided at local and global level)\r\n* Field constructors are encouraged to be more than just the field type\r\n* Allows setting configuration for fields in a meta\r\n* Will walk parents to find other configurations and combine into a single one\r\n* Will respect fields that exist in the MRO already --- should there be a force option to override the field?\r\n* Can auto register the schema itself when a target class is provided and registers as fields.Nested\r\n\r\n\r\n```python\r\nimport typing as t\r\nfrom marshmallow_annotations import AnnotationSchema\r\n\r\nclass Frob:\r\n    id: t.Optional[int]\r\n    name: str\r\n  \r\nclass Baz:\r\n    frobs: t.List[Frob]\r\n\r\nclass FrobSchema(AnnotationSchema):\r\n    class Meta:\r\n        target = Frob\r\n        register_as_scheme = True\r\n\r\nclass BazSchema(AnnotationSchema):\r\n    class Meta:\r\n        target = Baz\r\n        register_as_schema = True\r\n```"},"comment":{"url":"https://api.github.com/repos/justanr/marshmallow-annotations/issues/comments/385276720","html_url":"https://github.com/justanr/marshmallow-annotations/pull/4#issuecomment-385276720","issue_url":"https://api.github.com/repos/justanr/marshmallow-annotations/issues/4","id":385276720,"user":{"login":"justanr","id":4221605,"avatar_url":"https://avatars2.githubusercontent.com/u/4221605?v=4","gravatar_id":"","url":"https://api.github.com/users/justanr","html_url":"https://github.com/justanr","followers_url":"https://api.github.com/users/justanr/followers","following_url":"https://api.github.com/users/justanr/following{/other_user}","gists_url":"https://api.github.com/users/justanr/gists{/gist_id}","starred_url":"https://api.github.com/users/justanr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justanr/subscriptions","organizations_url":"https://api.github.com/users/justanr/orgs","repos_url":"https://api.github.com/users/justanr/repos","events_url":"https://api.github.com/users/justanr/events{/privacy}","received_events_url":"https://api.github.com/users/justanr/received_events","type":"User","site_admin":false},"created_at":"2018-04-29T19:52:09Z","updated_at":"2018-04-29T19:52:09Z","author_association":"OWNER","body":"Few more things:\r\n\r\n* List[Frob] -> Nested(FrobSchema, many=True)\r\n* Check forward declarations are handled properly \r\n* Write docs\r\n\r\nGonna punt on the default value for now"}}
{"actor":{"display_login":"justanr"}}