Skip to content

ID is not a valid property #48

Description

@mifriis

When uploading a spec with ID as a field in message the Reader throws an exception:

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "Bad Request",
  "status": 400,
  "detail": "Attempting to parse AsyncAPI file resulted in error 'id is not a valid property at #/components/schemas/themeDto, schema must be a map/object [#/components/schemas/themeDto/additionalProperties], Cannot create a scalar value from this type of node. [#/components/schemas/themeDto/properties/description/type], Cannot create a scalar value from this type of node. [#/components/schemas/themeDto/properties/parentThemeId/type], id is not a valid property at #/components/schemas/themeColorsDto, schema must be a map/object [#/components/schemas/themeColorsDto/additionalProperties], id is not a valid property at #/components/schemas/colorDto, schema must be a map/object [#/components/schemas/colorDto/additionalProperties], id is not a valid property at #/components/schemas/themeIconDto, schema must be a map/object [#/components/schemas/themeIconDto/additionalProperties], Cannot create a scalar value from this type of node. [#/components/schemas/themeIconDto/properties/themeLogoUrl/type], Cannot create a scalar value from this type of node. [#/components/schemas/themeIconDto/properties/signatureCharacterUrl/type], Cannot create a scalar value from this type of node. [#/components/schemas/themeIconDto/properties/altText/type], id is not a valid property at #/components/schemas/imageDto, schema must be a map/object [#/components/schemas/imageDto/additionalProperties], id is not a valid property at #/components/schemas/parentImagesDto, schema must be a map/object [#/components/schemas/parentImagesDto/additionalProperties], id is not a valid property at #/components/schemas/characterDto, schema must be a map/object [#/components/schemas/characterDto/additionalProperties], id is not a valid property at #/components/schemas/channelDto, schema must be a map/object [#/components/schemas/channelDto/additionalProperties], id is not a valid property at #/components/schemas/audienceDto, schema must be a map/object [#/components/schemas/audienceDto/additionalProperties]'",
  "traceId": "00-a22aa3f13d10a6e120298e343f385e17-62742295c4a30c42-00"
}

Error received through AMMA, but stems from AsyncAPI.NET

The spec is valid according to AsyncAPI Studio:

image

The spec:

{
    "asyncapi": "2.3.0",
    "info": {
        "x-application-id": "APP-00881",
        "x-audience": "company-internal",
        "x-skip-infrastructure": false,
        "title": "Mifriis-test-CatalogEventAPI",
        "version": "1.0.0",
        "description": "API for subscribing to changes in the Catalog. The Catalog is a variety of editorial content.",
        "contact": {
            "name": "Content Publishing Platform",
            "url": "https://teams.microsoft.com/l/channel/19%3a2dd4ddc220714cb09df23ff8fca99229%40thread.tacv2/General?groupId=6ea24e60-1f97-4b85-acac-6408ac51248f&tenantId=1d063515-6cad-4195-9486-ea65df456faa",
            "email": "49ad63d3.o365.corp.LEGO.com@emea.teams.ms"
        }
    },
    "defaultContentType": "application/json",
    "channels": {
        "ThemeChangedV1": {
            "x-eventarchetype": "objectchanged",
            "x-classification": "green",
            "x-datalakesubscription": true,
            "x-eventdurability": "persistent",
            "x-eventdeduplication": true,
            "publish": {
                "operationId": "ThemeChanged",
                "summary": "Theme changes",
                "description": "Themes published, unpublished or deleted.",
                "message": {
                    "$ref": "#/components/messages/ThemeV1"
                }
            }
        },
        "CharacterChangedV1": {
            "x-eventarchetype": "objectchanged",
            "x-classification": "green",
            "x-datalakesubscription": true,
            "x-eventdurability": "persistent",
            "x-eventdeduplication": true,
            "publish": {
                "operationId": "CharacterChanged",
                "summary": "Character changes",
                "description": "Characters published, unpublished or deleted.",
                "message": {
                    "$ref": "#/components/messages/CharacterV1"
                }
            }
        }
    },
    "components": {
        "schemas": {
            "themeDto": {
                "id": "themeDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique id for the specific translations"
                    },
                    "title": {
                        "type": "string",
                        "description": "Display title of the theme"
                    },
                    "description": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "Richtext description"
                    },
                    "colors": {
                        "description": "Theme colors",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/themeColorsDto"
                            }
                        ]
                    },
                    "icon": {
                        "description": "Theme icon",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/themeIconDto"
                            }
                        ]
                    },
                    "logo": {
                        "description": "Theme Logo",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "bannerStandard": {
                        "description": "Banner standard",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "bannerWide": {
                        "description": "Benner wide",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "parentThemeId": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "For sub-themes this property will contain the Id of the parent theme"
                    },
                    "parentImages": {
                        "description": "Images only available on parent themes",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/parentImagesDto"
                            }
                        ]
                    },
                    "invariantId": {
                        "type": "string",
                        "description": "Unique id across translations",
                        "format": "guid"
                    },
                    "contentLocale": {
                        "type": "string",
                        "description": "Localized language"
                    },
                    "marketLocale": {
                        "type": "string",
                        "description": "Published market"
                    },
                    "version": {
                        "type": "integer",
                        "description": "Published version",
                        "format": "int32"
                    },
                    "publishedAt": {
                        "type": "string",
                        "description": "Published at",
                        "format": "date-time"
                    }
                }
            },
            "themeColorsDto": {
                "id": "themeColorsDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "primary": {
                        "description": "Primary theme color",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/colorDto"
                            }
                        ]
                    },
                    "secondary": {
                        "description": "Secondary theme color",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/colorDto"
                            }
                        ]
                    },
                    "accentLight": {
                        "description": "Accent light color",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/colorDto"
                            }
                        ]
                    },
                    "accentDark": {
                        "description": "Accent dark color",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/colorDto"
                            }
                        ]
                    }
                }
            },
            "colorDto": {
                "id": "colorDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "red": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "green": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "blue": {
                        "type": "integer",
                        "format": "int32"
                    }
                }
            },
            "themeIconDto": {
                "id": "themeIconDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "themeLogoUrl": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "Theme logo",
                        "format": "uri"
                    },
                    "signatureCharacterUrl": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "Signature character",
                        "format": "uri"
                    },
                    "altText": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "Alternate text for the icon"
                    }
                }
            },
            "imageDto": {
                "id": "imageDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Absolute url to image",
                        "format": "uri"
                    },
                    "altText": {
                        "type": "string",
                        "description": "Image alternate text"
                    }
                }
            },
            "parentImagesDto": {
                "id": "parentImagesDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "logoPortrait": {
                        "description": "Logo portrait image",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "background": {
                        "description": "Background image",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "border": {
                        "description": "Border image",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "banner": {
                        "description": "Banner image",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "button": {
                        "description": "Button image",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    },
                    "playlist": {
                        "description": "Playlist image",
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/imageDto"
                            }
                        ]
                    }
                }
            },
            "characterDto": {
                "id": "characterDto",
                "type": "object",
                "description": "A person in a product or movie. Typically related to a mini-fig.",
                "additionalProperties": false,
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "descriptionKids": {
                        "type": "string"
                    },
                    "descriptionGrownups": {
                        "type": "string"
                    },
                    "mugshot": {
                        "$ref": "#/components/schemas/imageDto"
                    },
                    "landscapePose": {
                        "$ref": "#/components/schemas/imageDto"
                    },
                    "squareFullBody": {
                        "$ref": "#/components/schemas/imageDto"
                    },
                    "threeDSpin": {
                        "$ref": "#/components/schemas/imageDto"
                    },
                    "themes": {
                        "type": "array",
                        "description": "List of themes IDs",
                        "items": {
                            "type": "string"
                        }
                    },
                    "channels": {
                        "type": "array",
                        "description": "List of target channels names",
                        "items": {
                            "$ref": "#/components/schemas/channelDto"
                        }
                    },
                    "audiences": {
                        "type": "array",
                        "description": "List of target audiences names",
                        "items": {
                            "$ref": "#/components/schemas/audienceDto"
                        }
                    },
                    "animationVideoId": {
                        "type": "string",
                        "description": "Id of the video animations of this character"
                    },
                    "id": {
                        "type": "string",
                        "description": "Unique id for the specific translations"
                    },
                    "invariantId": {
                        "type": "string",
                        "description": "Unique id across translations",
                        "format": "guid"
                    },
                    "contentLocale": {
                        "type": "string",
                        "description": "Localized language"
                    },
                    "marketLocale": {
                        "type": "string",
                        "description": "Published market"
                    },
                    "version": {
                        "type": "integer",
                        "description": "Published version",
                        "format": "int32"
                    },
                    "publishedAt": {
                        "type": "string",
                        "description": "Published at",
                        "format": "date-time"
                    }
                }
            },
            "channelDto": {
                "id": "channelDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    }
                }
            },
            "audienceDto": {
                "id": "audienceDto",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    }
                }
            }
        },
        "messages": {
            "ThemeV1": {
                "payload": {
                    "$ref": "#/components/schemas/themeDto"
                },
                "name": "ThemeV1",
                "title": "Theme V1",
                "summary": "Marked specific theme",
                "description": "A theme data object containing title, description, colors and images. A theme is translated to a variaty of languages."
            },
            "CharacterV1": {
                "payload": {
                    "$ref": "#/components/schemas/characterDto"
                },
                "name": "CharacterV1",
                "title": "Character V1",
                "summary": "Marked specific character",
                "description": "A character data object containing title, description and images. The character is translated to a variaty of languages."
            }
        }
    },
    "externalDocs": {
        "description": "Product handbook",
        "url": "https://platform.pages.git42.corp.lego.com/handbook/docs/products/catalog/"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions