コード例 #1
0
ファイル: request.py プロジェクト: aaronj1335/mesh
    def reconstruct(cls, resource, description):
        description['schema'] = Field.reconstruct(description['schema'])
        for status, response in description['responses'].items():
            response['schema'] = Field.reconstruct(response['schema'])
            description['responses'][status] = Response(**response)

        return cls(resource, **description)
コード例 #2
0
    def reconstruct(cls, resource, description):
        description['schema'] = Field.reconstruct(description['schema'])
        for status, response in description['responses'].items():
            response['schema'] = Field.reconstruct(response['schema'])
            description['responses'][status] = Response(**response)

        return cls(resource, **description)
コード例 #3
0
ファイル: bundle.py プロジェクト: paramv/mesh
    def _parse_resource(self, resource):
        schema = resource.get('schema')
        if isinstance(schema, dict):
            for name, field in schema.items():
                schema[name] = Field.reconstruct(field)

        requests = resource.get('requests')
        if isinstance(requests, dict):
            for request in requests.itervalues():
                request['schema'] = Field.reconstruct(request['schema'])
                for response in request['responses'].itervalues():
                    response['schema'] = Field.reconstruct(response['schema'])
コード例 #4
0
ファイル: bundle.py プロジェクト: siq-legacy/mesh
    def _parse_resource(self, resource):
        schema = resource.get('schema')
        if isinstance(schema, dict):
            for name, field in schema.items():
                schema[name] = Field.reconstruct(field)

        requests = resource.get('requests')
        if isinstance(requests, dict):
            for request in requests.itervalues():
                request['schema'] = Field.reconstruct(request['schema'])
                for response in request['responses'].itervalues():
                    response['schema'] = Field.reconstruct(response['schema'])