Get properties of a field in a method description. Args: methodDesc: object, fragment of deserialized discovery document that describes the method. schema: object, mapping of schema names to schema descriptions. name: string, name of top-level field in method descripti
(methodDesc, schema, name)
| 1650 | |
| 1651 | |
| 1652 | def _methodProperties(methodDesc, schema, name): |
| 1653 | """Get properties of a field in a method description. |
| 1654 | |
| 1655 | Args: |
| 1656 | methodDesc: object, fragment of deserialized discovery document that |
| 1657 | describes the method. |
| 1658 | schema: object, mapping of schema names to schema descriptions. |
| 1659 | name: string, name of top-level field in method description. |
| 1660 | |
| 1661 | Returns: |
| 1662 | Object representing fragment of deserialized discovery document |
| 1663 | corresponding to 'properties' field of object corresponding to named field |
| 1664 | in method description, if it exists, otherwise empty dict. |
| 1665 | """ |
| 1666 | desc = methodDesc.get(name, {}) |
| 1667 | if "$ref" in desc: |
| 1668 | desc = schema.get(desc["$ref"], {}) |
| 1669 | return desc.get("properties", {}) |
no test coverage detected
searching dependent graphs…