Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Last active January 26, 2021 03:55
Show Gist options
  • Save thanakijwanavit/30445bca62b4e553231f6ae5e881a504 to your computer and use it in GitHub Desktop.
Save thanakijwanavit/30445bca62b4e553231f6ae5e881a504 to your computer and use it in GitHub Desktop.
productSchemaFor villaMasterSchema
from dataclasses_json import dataclass_json, Undefined, CatchAll
from dataclasses_jsonschema import JsonSchemaMixin
from dataclasses import dataclass
from typing import List
@dataclass_json(undefined=Undefined.INCLUDE)
@dataclass
class Product(JsonSchemaMixin):
iprcode: int
cprcode: int
# data: CatchAll
@dataclass_json
@dataclass
class ValueUpdate(JsonSchemaMixin):
items: List[Product]
def product():
return Product
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment