Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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:
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
Labels
bugSomething isn't workingSomething isn't working

Activity
mifriis commentedon Jul 5, 2022
@davidkaae FYI, this will be a breaker for you until fixed.
I have fixed up the spec for you in different ways though, bumped version to 2.3.0, moved deduplication down to channels and added required extension fields. This spec should let you set it up when this bug is fixed.
davidkaae commentedon Jul 5, 2022
Thank you @mifriis
FYI: This documentation https://github.com/LEGO/api-management-management-api/wiki/AsyncAPI#x-eventdeduplication still explain like deduplication is part of info.
I would also like to know a bit more about x-datalakesubscription (more documentation in the wiki). Like what is happening behind the scenes. It has an exciting name :D
VisualBean commentedon Jul 5, 2022
Hi @davidkaae
It is complaining about all of the "id" properties in your schemas.
We dont support this specific property of the JSON Schema standard - we generally support the ones listed here https://www.asyncapi.com/docs/reference/specification/v2.3.0#schemaObject
But the "id" properties you have are also not correct according to the specification (it should be
$id(after draft-4)).In the specification
$idis used as an (either uri or relative uri) reference pointer that can be used for 2 things$refis resolved against. (we also dont support external refs).In the above example it should have been
"$id" : "/schemas/channelDto"to be according to spec.$idand$refgo hand in hand as$ref, technically references$id. - the way our logic is implemented however is by the name key of the DTO itself and not the$idproperty (in the same way OpenAPI.Net does things)$idhas quite a few different semantics as to how it works, depending on which type of uri (relative/absolute) and how its used. which makes if "iffy".Do you need the
$idproperty?Also AdditionalProperties is not a boolean according to the Json Core specification.
TLDR;
We dont support
$idand probably won't, also youradditionalPropertiesproperty, should not be a boolean, but rather a map of additionalProperties.davidkaae commentedon Jul 5, 2022
The async api document is autogenerated with Saunter.
I will see if I can get the $id property removed.
VisualBean commentedon Jul 5, 2022
Just to clarify, it is not the "id" property of your models, but rather the "id" property of the schemas that hold the models. if that makes sense.,
davidkaae commentedon Jul 5, 2022
Yes, I get it :)
But it is still the:
Saunter.Generation.DocumentGenerator and Saunter.Serialization.NewtonsoftAsyncApiDocumentSerializer that generates it.
So I will have to "fikumdik" something with the serialization.
VisualBean commentedon Jul 5, 2022
Its very interesting that it does this, as its not actually part of the supported json specification draft 😅
Perhaps raising a bug would be needful as well.
Should i put something together?
VisualBean commentedon Jul 5, 2022
The problem seems to be related to Saunter using NJsonSchema, which is a lib for deserializing JsonSchema (draft-4). Which is technically not the supported one in AsyncApi 😅
mifriis commentedon Jul 5, 2022
Some more work, arrays of types isn't supported (not sure if it should be?)
I get this error now:
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": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique id for the specific translations" }, "title": { "type": "string", "description": "Display title of the theme" }, "description": { "type": "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": "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": { "type": "object", "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": { "type": "object", "properties": { "red": { "type": "integer", "format": "int32" }, "green": { "type": "integer", "format": "int32" }, "blue": { "type": "integer", "format": "int32" } } }, "themeIconDto": { "type": "object", "properties": { "themeLogoUrl": { "type": "string", "description": "Theme logo", "format": "uri" }, "signatureCharacterUrl": { "type": "string", "description": "Signature character", "format": "uri" }, "altText": { "type": "string", "description": "Alternate text for the icon" } } }, "imageDto": { "type": "object", "properties": { "url": { "type": "string", "description": "Absolute url to image", "format": "uri" }, "altText": { "type": "string", "description": "Image alternate text" } } }, "parentImagesDto": { "type": "object", "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": { "type": "object", "description": "A person in a product or movie. Typically related to a mini-fig.", "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": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" } } }, "audienceDto": { "type": "object", "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/" } }davidkaae commentedon Jul 5, 2022
With some fikumdik the following schema is not generated from my side.


The [ "null", "string" ] type was from "string?" properties in my DTO. I have not removed the ? and written the "Can be null" comment instead. There might be other properties that should get that description, but for now those that complained is changed.
Same for "Uri?" that was also generating the type [ "null", "string" ]. Now changed to this.
It is not pretty, but I can now generate the schema with the x-* properties in channels like this. Luckily for me (for now at least) all channels have the same properties.

Current schema
{ "asyncapi": "2.3.0", "info": { "x-application-id": "APP-00881", "x-audience": "company-internal", "x-skip-infrastructure": false, "title": "CatalogEventAPI", "version": "1.0.0", "description": "API for subscribing to changes in the Catalog. The Catalog is a variaty 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" } }, "servers": { "integration": { "url": "events.prod.async.api.legogroup.io:6651", "protocol": "pulsar+ssl" }, "prod": { "url": "events.prod.async.api.legogroup.io:6651", "protocol": "pulsar+ssl" } }, "defaultContentType": "application/json", "channels": { "ThemeChangedV1": { "x-eventdeduplication": true, "x-eventarchtype": "objectchanged", "x-classification": "green", "x-eventdurability": "persistent", "x-datalakesubscription": true, "publish": { "operationId": "ThemeChanged", "summary": "Theme changes", "description": "Themes published, unpublished or deleted.", "message": null } }, "CharacterChangedV1": { "x-eventdeduplication": true, "x-eventarchtype": "objectchanged", "x-classification": "green", "x-eventdurability": "persistent", "x-datalakesubscription": true, "publish": { "operationId": "CharacterChanged", "summary": "Character changes", "description": "Characters published, unpublished or deleted.", "message": null } } }, "components": { "schemas": { "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": "string", "description": "Richtext description. Can be null." }, "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": "string", "description": "For sub-themes this property will contain the Id of the parent theme. Can be null." }, "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": { "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": { "type": "object", "additionalProperties": false, "properties": { "red": { "type": "integer", "format": "int32" }, "green": { "type": "integer", "format": "int32" }, "blue": { "type": "integer", "format": "int32" } } }, "themeIconDto": { "type": "object", "additionalProperties": false, "properties": { "themeLogoUrl": { "type": "string", "description": "Theme logo. Can be null.", "format": "uri" }, "signatureCharacterUrl": { "type": "string", "description": "Signature character. Can be null.", "format": "uri" }, "altText": { "type": "string", "description": "Alternate text for the icon. Can be null." } } }, "imageDto": { "type": "object", "additionalProperties": false, "properties": { "url": { "type": "string", "description": "Absolute url to image", "format": "uri" }, "altText": { "type": "string", "description": "Image alternate text" } } }, "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": { "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": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/imageDto" } ] }, "landscapePose": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/imageDto" } ] }, "squareFullBody": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/imageDto" } ] }, "threeDSpin": { "oneOf": [ { "type": "null" }, { "$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": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "title": { "type": "string" } } }, "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/" } }mifriis commentedon Jul 5, 2022
Looks good @davidkaae
I havn't tested it yet, but AMMA on integration is ready (we think!) you can try uploading it there: https://panel.integration.amma.api.legogroup.io/docs/index.html
AMMA prod should also be (we are secretly live).
I am chasing down an issue where the specs aren't going through to Baseplate at the moment. Maybe we can work on a "how to setup saunter" together with you and the team after summer? for those that wish to generate instead of spec first
davidkaae commentedon Jul 5, 2022
Just tried, and I have some errors in my serialization. You don't have to test. I will fix my stuff and test again.
davidkaae commentedon Jul 5, 2022
Ok, my schema is not failing on validation anymore. Now it fails on this:

I am able to call other endpoints like [Get] .../me/workspaces.
Correlation id in text: 8565b564-9c1b-4284-8bd1-a2c0d72ae6ee
mifriis commentedon Jul 5, 2022
Maybe running it locally can aid here. I'm off on vacation and can't do it. (i get the same error with this spec: #48 (comment))
For whoever picks it up:
VisualBean commentedon Jul 5, 2022
This is a yamldotnet argument exception i believe. (Which triggers some specific pathing for us, why you get the exception message. Ill figure out the underlying issue tomorrow 🙂
VisualBean commentedon Jul 6, 2022
Type can be an array as well... this is sorted in this PR #49
VisualBean commentedon Jul 6, 2022
@davidkaae
It is complaining about 2 things
"message": null- nulls should not be propagated to the specification (i wonder why it does this)asyncapi/saunter#138
davidkaae commentedon Jul 6, 2022
@VisualBean yes I know that. That was the issues I was writing about above. I fixed those with this schema and got the "This scope value is not allowed" issue instead.
Hare are the updated schema, sorry for not posting that as well:
{ "asyncapi": "2.3.0", "info": { "x-application-id": "APP-00881", "x-audience": "company-internal", "x-skip-infrastructure": false, "title": "CatalogEventAPI", "version": "1.0.0", "description": "API for subscribing to changes in the Catalog. The Catalog is a variaty 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-eventdeduplication": true, "x-eventarchetype": "objectchanged", "x-classification": "green", "x-eventdurability": "persistent", "x-datalakesubscription": true, "publish": { "operationId": "ThemeChanged", "summary": "Theme changes", "description": "Themes published, unpublished or deleted.", "message": { "$ref": "#/components/messages/ThemeV1" } } }, "CharacterChangedV1": { "x-eventdeduplication": true, "x-eventarchetype": "objectchanged", "x-classification": "green", "x-eventdurability": "persistent", "x-datalakesubscription": true, "publish": { "operationId": "CharacterChanged", "summary": "Character changes", "description": "Characters published, unpublished or deleted.", "message": { "$ref": "#/components/messages/CharacterV1" } } } }, "components": { "schemas": { "themeDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique id for the specific translations" }, "title": { "type": "string", "description": "Display title of the theme" }, "description": { "type": "string", "description": "Richtext description. Can be null." }, "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": "string", "description": "For sub-themes this property will contain the Id of the parent theme. Can be null." }, "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": { "type": "object", "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": { "type": "object", "properties": { "red": { "type": "integer", "format": "int32" }, "green": { "type": "integer", "format": "int32" }, "blue": { "type": "integer", "format": "int32" } } }, "themeIconDto": { "type": "object", "properties": { "themeLogoUrl": { "type": "string", "description": "Theme logo. Can be null.", "format": "uri" }, "signatureCharacterUrl": { "type": "string", "description": "Signature character. Can be null.", "format": "uri" }, "altText": { "type": "string", "description": "Alternate text for the icon. Can be null." } } }, "imageDto": { "type": "object", "properties": { "url": { "type": "string", "description": "Absolute url to image", "format": "uri" }, "altText": { "type": "string", "description": "Image alternate text" } } }, "parentImagesDto": { "type": "object", "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": { "type": "object", "description": "A person in a product or movie. Typically related to a mini-fig.", "properties": { "name": { "type": "string" }, "descriptionKids": { "type": "string" }, "descriptionGrownups": { "type": "string" }, "mugshot": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/imageDto" } ] }, "landscapePose": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/imageDto" } ] }, "squareFullBody": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/imageDto" } ] }, "threeDSpin": { "oneOf": [ { "type": "null" }, { "$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": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" } } }, "audienceDto": { "type": "object", "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/" } }VisualBean commentedon Jul 6, 2022
This one gives me no errors on the current version of asyncapi.net (has not hit amma integration yet though)
davidkaae commentedon Jul 6, 2022
It was in amma integration I got the issue (see screenshot with correlation id).
VisualBean commentedon Jul 7, 2022
I located the bug. numbers are not currently allowed as scopes in AMMA. - it was not a yaml issue after all. Ill improve the error message and add numbers as allowed scopes.
https://github.com/LEGO/api-management-management-api/pull/891
VisualBean commentedon Jul 21, 2022
I believe we have fixed everything, except bindings - which is next up. otherwise please reopen