4902 bug fix fix api filter for enum (#4909)
- Handle NUMERIC, SELECT, PROBABILITY, RATING FieldMetadataTypes Those filters now works: - http://localhost:3000/rest/opportunities?filter=stage[eq]:MEETING - http://localhost:3000/rest/opportunities?filter=stage[in]:[MEETING,NEW] When providing wrong enum values, the following error messages are returned: - http://localhost:3000/rest/opportunities?filter=stage[eq]:MEETINGG > BadRequestException: 'filter' enum value 'MEETINGG' not available in 'stage' enum. Available enum values are ['NEW', 'SCREENING', 'MEETING', 'PROPOSAL', 'CUSTOMER'] - http://localhost:3000/rest/opportunities?filter=stage[in]:[MEETING,NEWW] > BadRequestException: 'filter' enum value 'NEWW' not available in 'stage' enum. Available enum values are ['NEW', 'SCREENING', 'MEETING', 'PROPOSAL', 'CUSTOMER']
This commit is contained in:
@ -11,6 +11,7 @@ describe('computeSchemaComponents', () => {
|
||||
).toEqual({
|
||||
ObjectName: {
|
||||
type: 'object',
|
||||
description: undefined,
|
||||
required: ['fieldNumber'],
|
||||
example: { fieldNumber: '' },
|
||||
properties: {
|
||||
@ -31,6 +32,9 @@ describe('computeSchemaComponents', () => {
|
||||
fieldNumber: {
|
||||
type: 'number',
|
||||
},
|
||||
fieldSelect: {
|
||||
type: 'string',
|
||||
},
|
||||
fieldString: {
|
||||
type: 'string',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user