Newest raml Questions

Q&A for professional and enthusiast programmers

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 ...

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....

How to reuse json in RAML example

I have the following files user.json "user": { "id": 1, "name": "nameuser", "online": true, "profile": { "photo": "", "validated": true, "popular": true, "suspect": false, ...

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: ...

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 ...

what are the advantages and dis-advantages of using swagger, RAML and API-blueprint [closed]

Swagger, RAML and API Blueprint all three are top specification formats for REST API's. I want to know which one is the best. I have gone through many blog posts, i am really confused which one i ...

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 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 ...

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 ...

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 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 ...

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: "...

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 ...

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 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 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

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 ...

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": { "...

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. ...

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", "...

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 ...

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 ...

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: ...

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" : { ... } "...

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' ...

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?

Cannot open RAML view in Atom editor

I installed Atom 1.8.0 and RAML package on my Ubuntu 16.04 machine. Then I opened the API source code in Atom and just wanted to open the RAML view (I have *.raml file), however I cannot see this ...

jasmine-node frisby failed to run generated raml test on codeship

I am running following raml generated test on codeship, it fails there but works fine on my local env. Any input will be helpful. Thanks Error: Stacktrace:Error: Error parsing JSON string: ...

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 ...

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: modelling an API with a raw query value

I'm putting together a RAML specification for an API which needs to take raw query value that does not adhere to the standard key=value&key=value form. The API needs to conform to the OpeNDAP ...

node module raml2http 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 ...

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 ...

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: ...

JSON Schema Validation in Mule: get failing field

I am using APIkit in Mule with RAML 0.8 and a JSON schema, as follows (example): { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "cart":...

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 ...

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 ...

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 ...

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. ...

Validation in RAML0.8.

Hello I am trying to include validation with RAML 0.8 in a .raml file. I would like to , for example , set a specific parameter different to null. How could I do that ?? I also want to generate code ...

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 ...

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 ...

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? ...

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 ...

RAML2HTML Templates Library

We recently decided to use RAML to document our API and all seems great so far. We are using the raml2html utility to generate static HTML documentation. The default template works great, but I've ...

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?

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 ...

Convert from .raml to swaggle does not update the dependencies

Hello I am trying to convert a file from .raml format to .swagger format. I use the exec-maven-plugin for doing that. I have the following problem : the dependencies are not updated in the swagger ...

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": [ { ...

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 ...
Translating... 0%