Comments (6)
can you put JSON.stringify(raml, void 0, 2)
in the console.log statement?
from oas-raml-converter.
That seemed to have done it. I took that js from the examples. Thanks
{
"openapi": "3.0.0",
"info": {
"title": "oas-raml-converter does not process this correctly",
"version": "undefined"
},
"servers": [
{
"url": "http://api.samplehost.com/"
}
],
"paths": {
"/geoCoordinates": {
"get": {
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/geoCoordinates"
}
}
}
}
},
"operationId": "GET_geoCoordinates"
}
}
},
"components": {
"schemas": {
"geoCoordinates": {
"properties": {
"latitude": {
"minimum": -90,
"maximum": 90,
"format": "double",
"description": "Latitude (degree range -90 to +90) with positive values for N latitude and negative for S latitude.",
"type": "number"
},
"longitude": {
"minimum": -180,
"maximum": 180,
"format": "double",
"description": "Longitude (degree range -180 to +180) positive values for E of the prime meridian, and negative values W longitude.",
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"type": "object"
}
},
"responses": {},
"parameters": {},
"examples": {},
"requestBodies": {},
"headers": {},
"securitySchemes": {},
"links": {},
"callbacks": {}
}
}
from oas-raml-converter.
it isn't expanded?
I'm not sure what you're showing
from oas-raml-converter.
shouldn't
schemas: { geoCoordinates: [Object] },
detail the properties of geoCoordinates (latitude, longitude)?
from oas-raml-converter.
Where do you get that output?
It might just not display it and says [Object]
because it's an object
from oas-raml-converter.
I get that output on the windows cmd when I run the following script:
var converter = require('oas-raml-converter');
var ramlToOas = new converter.Converter(converter.Formats.RAML, converter.Formats.OAS30);
var options = {
validate: true, // Parse both input and output to check that its a valid document
validateImport: true, // Only validate input
validateExport: true, // Only validate output
format: 'yaml' // Output format: json (default for OAS) or yaml (default for RAML)
};
ramlToOas.convertFile('broken4.raml', options).then(function(raml) {
console.log(raml); // raml is raml yaml string
})
.catch(function(err) {
console.error(err);
});
I realize it's an object. The issue is that the object properties do not appear anywhere. This happens to all my types, they are just converted to Object without any detail.
Just FYI, OS is Windows 10 Pro 64 bit, Nodejs version 9.7.0. oas-raml-converter version [email protected]. Is my node version too new?
from oas-raml-converter.
Related Issues (20)
- Invalid conversion result when converting RAML 1.0 with multiple examples to OAS 2
- Fails to install on macOS
- OAS 2.0 → RAML 1.0: [object Object] is not a valid Swagger API definition HOT 1
- Union Type ignored when converting to OAS3 HOT 1
- Wrong OAS30 object type definition which faultily inherits from string HOT 2
- In OAS30, converter should output all content types for one peculiar path HOT 2
- In OAS30, nullables are faultily converted to generic "object" type HOT 2
- In OAS30, inheriting schemas miss their required fields HOT 1
- In OAS3, converter should never use `$ref` at schema root since it prevents overriding metadata fields
- In RAML 1 to OAS3 conversion, resource description should not be a lost semantic
- In RAML1 to OAS3 conversion, header examples should be preserved
- In OAS 20 to RAML 1 conversion, properties in RAML should be required: false when a required array is missing in OAS
- OAS 2 to RAML 1 conversion generates invalid '0' media type when input OAS 2 file contains single string "examples" value
- OAS 2.0 to RAML 1.0 conversion generates invalid RAML when input OAS 2.0 file contains a non-top-level array type with inline items type definition
- Build problems
- RAML 1.0 to OAS 3.0 doesn't convert baseUriParameters default value
- RAML json schema REFs are not resolved recursively
- Library references cannot be chained HOT 2
- RAML 1.0 > OAS 3.0 not conforming to the spec when merging traits and resourceTypes
- ERROR ./node_modules/raml-1-parser/dist/parser/ast.core/expanderLL.js at compilation.
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 oas-raml-converter.