Oas to raml does not work well
LucasLudueno opened this issue · comments
Using npm library, if you convert oas to raml, some times the conversion is not right and this library does not detect it.
For example this oas file:
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore"
},
"host": "petstore.swagger.io",
"basePath": "/api",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/reviews": {
"x-raml-resource-displayName": "reviews"
},
"/reviews/{id}": {
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of review",
"required": true,
"type": "string"
}
],
"post": {
"operationId": "GET_reviews-id",
"description": "Returns a review",
"parameters": [
{
"name": "body",
"in": "body",
"description": "Review to add to the store",
"schema": {
"$ref": "#/definitions/NewReview"
}
}
],
"responses": {
"200": {
"description": "review response",
"examples": {
"application/json": {
"$ref": "#/definitions/Review"
}
}
}
}
},
"x-raml-resource-displayName": "{id}"
}
},
"definitions": {
"Review": {
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
},
"type": "object"
},
"NewReview": {
"properties": {
"title": {
"type": "string"
}
},
"type": "object"
}
}
}
Hi @LucasLudueno, This is a Swagger file converted from RAML. It's a pending issue from our side read extension properties (like x-raml-resource-displayName) and converted into proper value in RAML.
Hi @LucasLudueno latest repository version doesn't export custom extension (x-raml-...) anymore so you won't have this problem anymore. Thanks.