-
Notifications
You must be signed in to change notification settings - Fork 3
Update OpenAPI spec for ticket updated attribute metadata #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12442,6 +12442,15 @@ paths: | |
| email: [email protected] | ||
| attachments: [] | ||
| redacted: false | ||
| updated_attribute_data: | ||
| attribute: | ||
| type: "attribute" | ||
| id: "10" | ||
| label: "Photo" | ||
| value: | ||
| type: "value" | ||
| id: [2] | ||
| label: ["photo.png"] | ||
| - type: ticket_part | ||
| id: '178' | ||
| part_type: ticket_attribute_updated_by_admin | ||
|
|
@@ -12454,6 +12463,15 @@ paths: | |
| email: [email protected] | ||
| attachments: [] | ||
| redacted: false | ||
| updated_attribute_data: | ||
| attribute: | ||
| type: "attribute" | ||
| id: "7" | ||
| label: "Progress" | ||
| value: | ||
| type: "value" | ||
| id: "Fast" | ||
| label: "Fast" | ||
| - type: ticket_part | ||
| id: '179' | ||
| part_type: ticket_state_updated_by_admin | ||
|
|
@@ -19958,6 +19976,72 @@ components: | |
| nullable: false | ||
| example: text-integration | ||
| description: The app package code if this part was created via API. Note this field won't show if the part was not created via API. | ||
| updated_attribute_data: | ||
| title: Updated Attribute | ||
| type: object | ||
| description: The updated attribute data of the ticket part. Only present for attribute update parts. | ||
| nullable: true | ||
| properties: | ||
| attribute: | ||
| type: object | ||
| description: Information about the attribute that was updated. | ||
| properties: | ||
| type: | ||
| type: string | ||
| description: The type of the object. Always 'attribute'. | ||
| enum: | ||
| - attribute | ||
| example: attribute | ||
| id: | ||
| type: string | ||
| description: The unique identifier of the attribute. | ||
| example: "7" | ||
| label: | ||
| type: string | ||
| description: The human-readable name of the attribute. | ||
| example: "Progress" | ||
| required: | ||
| - type | ||
| - id | ||
| - label | ||
| value: | ||
| type: object | ||
| description: The new value of the attribute. | ||
| properties: | ||
| type: | ||
| type: string | ||
| description: The type of the object. Always 'value'. | ||
| enum: | ||
| - value | ||
| example: value | ||
| id: | ||
| oneOf: | ||
| - type: string | ||
| description: The value for text/number/decimal/boolean/date attributes, or the ID of the list option for list attributes. | ||
| nullable: true | ||
| example: "Fast" | ||
| - type: array | ||
| description: Array of file IDs for file attributes. | ||
| items: | ||
| type: integer | ||
| example: [2] | ||
| label: | ||
| oneOf: | ||
| - type: string | ||
| description: The display value for text/number/decimal/boolean/date/list attributes. | ||
| example: "Fast" | ||
| - type: array | ||
| description: Array of file names for file attributes. | ||
| items: | ||
| type: string | ||
| example: ["photo.png"] | ||
| required: | ||
| - type | ||
| - id | ||
| - label | ||
| required: | ||
| - attribute | ||
| - value | ||
| ticket_part_author: | ||
| title: Ticket part author | ||
| type: object | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these arrays because attributes can be arrays? Or what's the reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. There are different kind of attributes and the way we have the ID and label can slightly differe in different cases. See examples here
Mainly, file attributes can hold multiple files in a single attribute. That's the reason arrays are used there if the attribute is a file attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case of an attribute is cleared,
idcan either be null or an empty array (for file attribute)labelcan either be an empty string or empty array (for file attribute)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the
typefield not change depending on if it's an array or single value? Or does the client need to check for array or single value each time?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently
typeonly returnsattribute. We can add some extra queries to find the actual type of the attribute and use that as the type so the client would know what to expect there.Alternatively the client can query that separately if they want to know the type of the attribute for that ticket type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait to hear from the customer so we can improve that furthermore.