Newest raml Questions

Q&A for professional and enthusiast programmers

Is allOf cannot be used in RAML 0.8?

In my Scraml project, Am using a JSON schema like this. { "$schema": "http://json-schema.org/draft-04/schema#", "id": "file:///C:/json", "DomainResource": { "allOf": [ { ...

How to include the generation of html files from raml files during the building of a maven project

I am working on a Java REST application, and I have raml files that document the API of the endpoints. The application is built using maven. Until now we have been manually generating html files from ...

Document pdf/binary response in RAML

I am currently writing a documentation for an api which returns a json or a pdf (binary) based on the Accept-Header sent to the system. How can I specify that the response is of type binary or ...

Type definition approach

Suppose that I have a endpoint that support three methods: GET, POST and PUT. The type that will be returned contais two attributes: an id and a name. Both are required. My question is about how to ...

JSON schema reference ($ref) not expanded when using raml2html

I'm using raml2html to generate HTML pages from JSON schemas. But the schema reference ($ref) used in my JSON schema is not expanded as expected and I'm not sure why. I've followed instructions from ...

RAML- !include strange behavior

I use this extension for Atom, to design my API, written in RAML. I think I have a problem here :(I masked title and baseUri, sorry) : If I follow RAML 1.0 specs, I should put a "!include". ...

How to get TypedObject (Observable <Integer>) using Raml

I am using RAML to generate my Endpoints and my json data structure which i pass for API generation is: This is the Json for TestWrapper: { "$schema": "http://json-schema.org/draft-4/schema", "...

How to deploy RAML API's to Mule standalone

I have created an API using RAML and I have been able to expose it as a Web site on my local Windows laptop. However, now I need to install Mule standalone on a server an install it there. The ...

RAML definition reusable sub-route

Our api will have a reusable /posts subroute that will apply to different top-level routes. For example: /me/posts /users/{user-id}/posts ... Example for posts: /posts /{post-id} ...

How to expose API documentation in Anypoint Studio

I have set up a RAML API on Anypoint studio and the Mock is working. How can I expose the documentation I see in the Console on a Web page so that other people can see it? Thanks

UnsupportedMediaTypeException RAML Mule

Requirement - User will hit an URL and a CSV is downloaded on calling machine. Implementation Below is my RAML (1.0) definition /{format}: is: [ genericErrorResponsesCompliant ] get: ...

RAML to JAX-RS Doesn't Generate Code(raml-for-jax-rs Eclipse Plugin)

I have installed the raml-for-jax-rs plugin (https://github.com/mulesoft/raml-for-jax-rs/blob/master/eclipseplugin.md) into the Luna and Neon versions of Eclipse. When I right click on my RAML file ...

Mule and RAML 1.0 - use of includes and libraries for dataTypes and ResourceTypes

I'm exploring the possibilities of RAML 1.0 icw Anypoint Studio. Since we have data types and resources (for responses or CDMs) which are commonly used by several APIs on the Anypoint Platform. I ...

How to create line breaks in the description file in RAML?

I have a field in RAML that requires a very long description. Is there a way to break it up into multiple lines? Example: "description": "This is a very long string" I would like it to render as: "...

When to use singular or plural resource names in RAML

I am writing my first RAML for a Mule project and had a query around naming convention. At the moment I have a requirement where a customer will make a single payment. So I have a /payment resource. ...

Defining a schema for response with multiple lines

I am areal newby on RAML. I'm trying to define a schema for a response that will contain multiple lines, just like a resultset in SQL. I have done this but just for one line responses. I also would ...

RAML - json schema error

I have included a JSON schema file in RAML. In the real file, I'm getting an error saying "The included resource schemas/createRecord.json contains an error" I have validated the JSON file, but it ...

Reuse schema for POST and PUT methods in RAML(0.8)

Consider the below json which is used in POST and PUT methods, but the differences are, POST doesn't require id property but remaining properties, where as PUT required .all properties including id ...

is there any java 2 RAML parser available

i am trying to solve the following problem: lets say i have some java interfaces that i need transfer to Restful API Modeling Language. is there any library that can help me to do that?

How to make a different list of fields for request and response body in RAML resource type?

I have a type definition for the Client model: types: Client: properties: id: integer first_name: string last_name: string company: string address: string ...

How to define a “image/jpeg” response in RAML?

I'm defining an API using RAML and I need return an image content (not as a JSON). Any special hint how to expose the method "content" in my API? /images/{imageId}: get: responses: 200:...

REST api definition json schema for id fields - RAML

Consider the following notice-schema.json definition of a Notice object { "required": true, "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "...

How to include an XML schema (.xsd) in a JSON schema?

I want to define a JSON API response using JSON Schema. Embedded in part of the API response is a complete, well-formed, schema valid XML string. The XSD of this XML string is a given. Two part ...

RAML 1.0 - Multiple Examples for a Single Response

I am unable to find any code anywhere that demonstrates using a !include for multiple examples. I'm trying to attempt the following: 200: description: Successful project creation body: ...

Does RAML support multiple response schemas for the same content type?

In my project all POJO class are extending parent class.As my controller has one method whose return type is parent class but actually it is returning child class here I am using a concept of ...

How to generate documentation and client code for RAML?

I'm new working on a project where they want to use RAML to define the APIs. I got the RAML-JAX-RS p0lugin for Eclipse. With that I was able to generate a RAML file from an existing REST service. I ...

mulesoft: ERROR: ramlParser: loadPath: loadApi: content/[object Object]: no such path

I am using API Editor in Mulesoft and I am getting following error ramlParser: loadPath: loadApi: content/[object Object}: no such path It seems to be related to inclusions of libraries in main RAML ...

My response is extending jersey response.How can i exclude other fields and send only my model class object as response?

In this response, it includes all fields from jersey response class. How can i remove these field from my response and send only entity as a response object. I have generated my interfaces and model ...

Change value of element in xml file which is based on raml21.xsd schema in asp.net

below is xml file which I want to update (for example - change dateTime attribute in log element). <?xml version="1.0" encoding="UTF-8" standalone="no"?> <raml xmlns="raml21.xsd" version="2....

Why do my JSON Results pass the schema validation on NewtonSoft site's validator but not in AnyPoint API Designer?

I have this schema: { "$schema": "http://json-schema.org/draft-04/schema#", "type" : "object", "properties": { "competingApplications": { "type": "array", "items": { ...

Does Swagger/RAML (or any similar REST API spec) supports REST asynchronous client callbacks?

I want to use REST async client callback, meaning the server is causing a callback operation to be invoked on the client side when a response is ready (see Jersey's 'Asynchronous Services and Clients' ...

RAML multiple schemas in one body response

so I have the following raml definition. responses: 200: body: application/json: schema: !include responseHeader.json Now I need to add another schema that contains this ...

How to test with api-designer (RAML editor)?

Just like postman does, does api-designer support that? I try to POST my request to my service (127.0.0.1:8180) and if I click 'API is behind a firewall', it POST http://127.0.0.1:8180/v1/device,and ...

RAML Unknown facet 'types'

I am receiving an issue with a datatype .raml file that I am attempting to create. For some reason, it is stating that I am 'Specifying unknown facet 'types' as an error. What is the proper way ...

How to define a map in RAML 1.0

i want to model an API with RAML 1.0. Within this API i have a map where the included objects have dynamic key values. It should look like the following: "map" : { "key1" : { ... } "...

A usable dev RAML mocker

Im totaly green in JavaScript but i have to work with raml-mocker writed in JS. My problem is to add additional possibility of serving example responses on top of existing default responses. I should ...

How can I indent and bullet som paragraphs in a MULE description

I'm writing an API sepc using RAML and publishing using MULE standalone. I want to indent and bullet some parapgrach in the description of a Verb within a Resource. Is that possible? I tried using p ...

How to define 2 query params with same name in RAML

I am trying to define RAML for REST API. According to my specification, I need to set 2 query parameters with the same name. There isn't any possibility to change the specification. Is it possible? ...

RAML include and multiple inheritance

We have been writing our RAML specification and we've been defining our data types in separate files. Something like: %#RAML 1.0 DataType type: !include ../base-type.raml description: Lorem ipsum ...

Unable to resolve raml file errors

I have been given the attached RAML file to use in Mule but I am having problems working out how to clean up the errors in the file and not even sure this raml file conforms to standards. The errors ...

RAML file is throwing invalid Json schema response in Anypoint Studio

I am using Anypoint Studio 6.2 with Mule 3.8.1 and I have added a raml and JSON schema which shows no errors in api-workbench but show Json schema invalid errors in Anypoint Studio. I have found that ...

maven plugin requires unused jar

I am trying to use jaxrs-raml-maven-plugin in our maven project and can't understand why the plugin configured in one module requires a class from another module, which is not on the classpath. I am ...

RAML different queryParameters, same resource

I'm creating a RAML file where I would like to have 2 different queryParameters for the same GET. So /userinfo, for example, could be accessed by either set. /userinfo: get: ...

How do I serve a static file with httprouter with correct MIME type?

I'm using the httprouter Go library to implement a REST API service, and I decided to try ServeFiles to serve some schema files associated with my API. I note that it uses Go's handy built-in net/http ...

Using $ref for jsonschema in Abao

Can someone help with schemas refs in abao? How to use --schemas option? Here is simple gist https://gist.github.com/SeanSilke/e5a2f7673ad4aa2aa43ba800c9aec31b I try to run "abao api.raml --schemas ...

Browse files in RAML - workaround

I have done some research and it appears that the RAML console does not support the functionality to browse for files. link1, link2, link3. Is there perhaps an unofficial workaround to this problem?

RAML API baseUriParameters unused template parameter error

I want to create a different base URI for each of the dozen customers of my API so the endpoints are the same but I can filter on customer. I think adding a template parameter to the base URI is the ...

node module raml2html returning empty braces

I am using raml2http node package to convert my raml document to html document. Installed raml2http gloabally using npm install -g raml2html Command to convert raml to html raml2html -i [input ...

Schema and examples not generated while working with mulesoft RAML 1.3.4 + in eclipse

Using eclipse plugin to "Generate RAML from classes", when Generating the RAML from the classes, ticks the "Generate schema and examples" but it doesnt generate the schema and example for the API. ...

Describing throttling or rate limiting in a RAML spec

I am looking to specify the rate limiting and throttling requirements for an API. I am already using RAML to outline the the API but I am not restricted to a specific RAML version. I have considered ...
Translating... 0%