The $ref field points to a file that lives in the same folder. When I build my html output from RAML, everything is fine.
But when I convert my file to OAS2, i get an incorrect $ref value, notice "$ref": "./financial_instrument_transaction.json":
{
"swagger": "2.0",
"info": {
"title": "Webhooks",
"version": "0"
},
"host": "example.com",
"basePath": "/v0/d/payments",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/instruments": {
"post": {
"description": "Description here\n",
"operationId": "Create financial instrument",
"responses": {
"200": {
"description": "The operation was successful.\n",
"schema": {
"title": "Schema of a successful financial operation.",
"description": "A list of transactions that resulted from a successful operation. If the operation is asynchronous, this list is empty. To complete the request, use the Payment Provider Asynchronous API to notify NewStore of the outcome of the request.",
"type": "array",
"items": {
"type": "string",
"items": {
"$ref": "./financial_instrument_transaction.json"
}
}
}
}
},
"parameters": [
{
"schema": {
"title": "Create instrument operation schema",
"required": [
"account_id"
],
"type": "object",
"properties": {
"account_id": {
"type": "string"
}
}
},
"in": "body",
"name": "body",
"required": true
}
]
}
}
}
}
So it seems that the converter does not resolve refs recursively. The correct conversion should be "$ref": "hook/financial_instrument_transaction.json" or the whole referenced file should be pulled in (which would make more sense).
Hi,
Thanks for this converter! I'm trying to convert some RAML1.0 to OAS2.
I use this RAML file:
This last line import this
hook/operation_success.json
file:The
$ref
field points to a file that lives in the same folder. When I build my html output from RAML, everything is fine.But when I convert my file to OAS2, i get an incorrect $ref value, notice
"$ref": "./financial_instrument_transaction.json"
:So it seems that the converter does not resolve refs recursively. The correct conversion should be
"$ref": "hook/financial_instrument_transaction.json"
or the whole referenced file should be pulled in (which would make more sense).Could this be fixed, somehow?
Thanks 🙂