Freeform subobject in json-schema

前端 未结 1 633
-上瘾入骨i
-上瘾入骨i 2020-12-22 08:49

I am drafting an API documentation with swagger.io and is trying to make it fit to our use case. The system is going to receive and process data from all sources, and they w

相关标签:
1条回答
  • 2020-12-22 09:35

    type: object without properties describes a free-form object. So the response schema can be:

    type: object
    properties:
        original:
            type: object
        processed:
            type: object
            properties:
                stdFieldA:
                    type: string
                stdFieldB:
                    type: string
    
    0 讨论(0)
提交回复
热议问题