Skip to content

Incorrect Swager Definition for eav-data-attribute-option-interface  #18525

@vetshopdeveloper

Description

@vetshopdeveloper

Preconditions

  1. 2.2.6

Steps to reproduce

  1. create a rest call to CatalogProductAttributeRepositoryV1Api.CatalogProductAttributeRepositoryV1GetListGet with search parameters of attribute_set_id > 0

or

any other endpoint that returns an object of eav-data-attribute-option-interface were is_default is to true

Expected result

  1. is_default return as a bool when present

Actual result

  1. is_default returns an object

2.2.6 SWAGGER Definition

"eav-data-attribute-option-interface": {
			"type": "object",
			"description": "Created from:",
			"properties": {
				"label": {
					"type": "string",
					"description": "Option label"
				},
				"value": {
					"type": "string",
					"description": "Option value"
				},
				"sort_order": {
					"type": "integer",
					"description": "Option order"
				},
				"is_default": {
					"type": "boolean",
					"description": "Default"
				},
				"store_labels": {
					"type": "array",
					"description": "Option label for store scopes",
					"items": {
						"$ref": "#/definitions/eav-data-attribute-option-label-interface"
					}
				}
			},
			"required": [
				"label",
				"value"
			]
		},

Sample of returned json

CatalogProductAttributeRepositoryV1Api.CatalogProductAttributeRepositoryV1GetListGet

"attribute_code": "country_of_manufacture",
   "options":[
     {
	"label": "United States",
         "value": "US",
	"is_default": [
		"1"
		]
    },

Expected Return

{
  "label": "United States",
  "value": "US",
  "is_default": "1"
},

Metadata

Metadata

Assignees

Labels

Component: SwaggerFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasegood first issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions