Skip to content
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

Unit breaks OpenAPI conversion #36

Open
egekorkan opened this issue Aug 30, 2023 · 0 comments
Open

Unit breaks OpenAPI conversion #36

egekorkan opened this issue Aug 30, 2023 · 0 comments
Labels

Comments

@egekorkan
Copy link
Member

egekorkan commented Aug 30, 2023

A TD like below results in an error when trying to convert to Open API due to presence of unit. Removing unit fixes the transformation.

{
    "@context": "https://www.w3.org/2022/wot/td/v1.1",
    "title": "Coffee Machine",
    "securityDefinitions": {
        "nosec_sc": {
            "scheme": "nosec"
        }
    },
    "security": [
        "nosec_sc"
    ],
    "properties": {
        "resources": {
            "readOnly": true,
            "observable": true,
            "type": "object",
            "properties": {
                "water": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 100,
                    "unit": "%"
                }
            },
            "forms": [
                {
                    "href": "http://192.168.1.112:8081/coffee-machine/properties/resources",
                    "contentType": "application/json",
                    "op": [
                        "readproperty"
                    ],
                    "htv:methodName": "GET"
                }
            ],
            "writeOnly": false
        }
    },
    "id": "urn:uuid:e8319e4c-ee5c-4a8b-a8f5-b2f255789431",
    "description": "A simple coffee machine that can be interacted over the Internet",
    "support": "https://github.com/eclipse-thingweb/node-wot/"
}
@egekorkan egekorkan changed the title Unit of % breaks OpenAPI conversion Unit breaks OpenAPI conversion Aug 30, 2023
@egekorkan egekorkan transferred this issue from eclipse-thingweb/playground Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant