rbw / aiosnow

Asynchronous ServiceNow Library
MIT License
73 stars 12 forks source link

Add Support for Request parameters #109

Open weyCC81 opened 2 years ago

weyCC81 commented 2 years ago

Is there a simple option on the client or resource to give nested values back?

Comparison with "pysnow" There were the following parameters in pysnow available

client.parameters.display_value = False client.parameters.exclude_reference_link = True

Implementation in "aiosnow" I found an option to call the display value for nested objects, but it looks like there is a lot of code needed to implement that. What options are available to define some specific values of a table to be display values?

Workaround 01 / #27 #97

<StringMapping [key=1da4392, value=Company)]>

Usage of ModelSchema with json_normalize = partly solved (is that the way to go?)

Workaround 02 / #91

<IntegerMapping [key=7, value=Closed]>

Usage of fields definition = partly solved (just key not value) https://github.com/rbw/aiosnow/blob/ae362b9238461d1823f1fc3564578832c899ea04/docs/usage/model/declare.rst

Solution

fields.String(pluck=Pluck.DISPLAY_VALUE)

Is it possible to enable Pluck on a global scale?

Reference: