Comments (7)
actually, the reason is not working is because oneOf
was introduced starting from version 1.1.0
you can find more information here https://fmvilas.com/announcing-asyncapi-1-1-0/
thanks, @fmvilas for pointing this out
from generator.
I copied your definition to the online editor http://editor.asyncapi.org/ and it worked changing the asyncapi version to 1.2.0.
"asyncapi": "1.2.0"
can you try that?
from generator.
Yep, we're now updating the website. It's creating many confusions. Thanks for reporting it!
from generator.
Removing them doesn't solve the problem so there must be something else wrong, but I don't know what it is.
from generator.
Can you put a complete example of a definition you are trying to use
from generator.
@rmelian Sure, here is a reduced example:
{
"asyncapi": "1.0.0",
"info": {
"title": "openEO API for Subscriptions",
"version": "0.4.0",
"description": "...",
"contact": {
"name": "openEO Consortium",
"url": "http://openeo.org/",
"email": "[email protected]"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"baseTopic": "openeo",
"topics": {
"data": {
"publish": {
"summary": "Inform about changes regarding an EO dataset.",
"description": "At least one of the `temporal_extent` and `spatial_extent` fields MUST be specified.\n\nSubscriptions to this message can be restricted to a certain collection by specifying `name` and providing a valid collection name.",
"payload": {
"type": "object",
"required": [
"message",
"payload"
],
"properties": {
"message": {
"$ref": "#/components/schemas/message"
},
"payload": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"$ref": "#/components/schemas/collection_name"
},
"temporal_extent": {
"type": "array",
"description": "MUST be specified if the temporal extent of the dataset has changed. The temporal extent is always specified as an array, that consists of either a single timestamp or a start and an end time, each element formatted as a RFC 3339 date-time. Specifies the temporal extent of the data that has changed, not of the whole dataset. Example: The dataset covers images from beginning of 2015 until the end of 2018. A single image has been added, captured at the first day in 2019 at 01:00:00 UTC (1am). The spatial extent specified here must be an array containing a single string: `2019-01-01T01:00:00Z`.",
"example": [
"2016-01-01T02:30:00Z",
"2016-01-01T04:45:00Z"
],
"minItems": 1,
"maxItems": 2,
"items": {
"type": "string",
"format": "date-time"
}
},
"spatial_extent": {
"type": "object",
"description": "MUST always be specified. It is the spatial extent of the data that was changed. Specifies the spatial extent of the data that has changed, not of the whole dataset. Example: The dataset covers the whole world and an image of Austria has been added. The spatial extent specified here must be the bounding box of Austria.",
"required": [
"west",
"south",
"east",
"north"
],
"properties": {
"crs": {
"description": "Coordinate reference system specified as [EPSG](http://www.epsg.org) code or [PROJ](https://proj4.org) definition. Defaults to `4326` (EPSG code 4326) unless the client explicitly requests a different coordinate reference system.",
"oneOf": [
{
"title": "EPSG Code",
"type": "integer",
"format": "epsg-code",
"example": 7099
},
{
"title": "PROJ definition",
"type": "string",
"format": "proj-definition",
"example": "+proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
}
],
"default": 4326
},
"west": {
"description": "West (lower left corner, coordinate axis 1).",
"type": "number"
},
"south": {
"description": "South (lower left corner, coordinate axis 2).",
"type": "number"
},
"east": {
"description": "East (upper right corner, coordinate axis 1).",
"type": "number"
},
"north": {
"description": "North (upper right corner, coordinate axis 2).",
"type": "number"
},
"base": {
"description": "Base (optional, lower left corner, coordinate axis 3).",
"type": "number"
},
"height": {
"description": "Height (optional, upper right corner, coordinate axis 3).",
"type": "number"
}
}
}
}
}
}
},
"example": {
"message": {
"issued": "2018-08-07T14:06:36Z",
"topic": "openeo.data"
},
"payload": {
"name": "MOD18Q1",
"temporal_extent": [
"2018-08-07T15:30:00Z",
"2018-08-08T16:43:00Z"
],
"spatial_extent": {
"west": 34.6,
"south": 39.6,
"east": 35.1,
"north": 40.1
}
}
}
}
}
},
"components": {
"schemas": {
"message": {
"type": "object",
"required": [
"topic",
"issued"
],
"properties": {
"issued": {
"type": "string",
"format": "date-time",
"description": "Date and time when the message was sent, formatted as a RFC 3339 date-time."
},
"topic": {
"type": "string",
"description": "Message type",
"example": "openeo.sample"
}
}
},
"collection_name": {
"type": "string",
"description": "Unique identifier for EO datasets.",
"example": "MOD18Q1"
}
}
}
}
from generator.
@rmelian @fmvilas Thanks a lot for spotting that. I never noticed there's a new version. Maybe due to the fact that if you go to https://www.asyncapi.com/ and click "Learn" and "The specification" it still leads you to v1.0.0!
from generator.
Related Issues (20)
- Improve arborist (npm installation) to have no hacks HOT 4
- Allow $$operation$$ file template HOT 2
- `noOverwriteGlobs` will not work in majority of cases in templates using react HOT 10
- Proposal for mentorship of potential maintainers of generator -> `Becoming a Maintainer of AsyncAPI Generator` HOT 22
- [BUG] Demo from homepage does not work HOT 9
- Need to add proper options to generate the template from private registory using CLI HOT 2
- Allowing Generator to pull the templates from the private GitHub Repository HOT 1
- [Docs Bug 🐞 report]: The `template-constant` link is broken at the generator docs HOT 6
- [Docs Bug 🐞 report]: The `AsyncAPI document` button is broken at the generator docs HOT 3
- [📑 Docs]: Improve documentation related to `File templates` feature HOT 8
- `conditionalFiles` feature is broken when template uses `server` special parameter HOT 1
- Incoming changes for generator HOT 3
- Support platform generator type templates to infrastructure as code HOT 4
- [BUG] Docker container html template is not compatible with generator HOT 3
- Figure out what development flow will be without cli.js HOT 4
- Add Post-installation script for Cli.js deprecation and migration
- Migration Guide to md & post-installation script to deprecate `cli.js` HOT 4
- create our own changeset bot HOT 1
- Provide a development.md or **Development Guide** in readme where you explain how to start project locally and do some basic manual tests and how to run existing tests in isolated docker env HOT 1
- Put all (most) templates into the generator together for better developers' experience HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.