Questions tagged [raml]
RESTful API Modeling Language (RAML)
332
questions
0
votes
1answer
17 views
How to define a union of a type in an external file in Raml datatype fragment?
First, this question is similar to, but different from How to define an array of a type in an external file in Raml?, except I want to make a DataType (A) that has a property that is a union of two ...
0
votes
2answers
23 views
Mule#4: RAML not able to parse JSON in escape characters
I have following schema declared in RAML 1.0
body:
application/json:
type: object
properties:
region:
example:
strict:...
0
votes
1answer
40 views
default query parameter integer 0 value in RAML
I have created a query parameter with a default integer 0 value in RAML and in Exchange this value not displayed. Could anyone help with it?
Example RAML
uriParameters:
page:
required: true
...
0
votes
0answers
28 views
Generate RAML file for existing API in Java
I am new to RAML and I am looking for a tool or any way by which I can create the RAML file by passing few details. It will take a lot of time if I try to write RAML files for existing API manually.
...
0
votes
1answer
20 views
how to define map[string][]string in raml query parameter
I am willing defining an query parameter in RAML that is map[string][]string, But i don't know how to define it. Instead of that i use examples, but API Designer does not show it as i define.
my ...
0
votes
1answer
37 views
Validating fields in a RAML datatype against each other
I need to create a RAML datatype for a request where a user can enter the First Name and Last Name or Business Name. If the user is entering the First Name, then he should give the Last name also, but ...
0
votes
0answers
37 views
Importing Github RAML folder fails with “Imported folder contains multiple Root of the RAML 0.8 Specs.”
I'm starting to look at a tool that uses RAML. I noticed the following old blog post that demonstrates importing RAML folders into Postman: https://blog.postman.com/supporting-raml-folders-in-postman/...
2
votes
0answers
17 views
Encrypted data types in RAML
Am trying to define an API spec, that is expecting the post body to be signed and encrypted. Is there any way we can define this in RAML? Security schemes etc allow you to define authN/authZ etc but ...
0
votes
0answers
10 views
How to turn off side bar navigation in raml2html?
While converting an RAML file to HTML, how can I turn off sidebar navigation in the output HTML.
raml2html example.raml > example.html
I found an option is available to provide custom template ...
0
votes
0answers
14 views
Exchange dependencies in Mulesoft Design Center
i was trying to import dependencies from exchange in my RAML but i am not sure if there is any better way of doing that. For example, in below code if version of the SomRequestExample.raml changes, it ...
0
votes
1answer
16 views
RAML - how to design endpoints with parameters?
I have a requirement to design this spec using RAML:
Resource: quantity
Method: GET
URL: {orderId}/{itemId}/quantity
Objective is to pass orderId and itemId in the URI and get quantity. I am ...
0
votes
1answer
195 views
How to set multiple example requests and its responses in RAML
Can you tell me how to set in RAML 1.0, if its even possible, multiple requests and its responses as examples.
I have in anypoint studio 5 api's and I want to merge them into one. I wanted to merge ...
0
votes
0answers
20 views
How to describe an xml response
I am trying to document my API using RAML, and I have a lot of responses which return an xml response. I don't know how to describe the structure of the responses properly. For example, if the ...
0
votes
0answers
14 views
XML from RAML definition not working in anypoint designer
I have created a resource in anypoint api designer.
#%RAML 1.0
. . . .
. . . .
/test-test:
post:
body:
application/xml:
type: myLib.grade
Here is type definition:
#%RAML 1.0 Library
...
1
vote
1answer
52 views
RAML dependent required query parameters
I have the following trait:
traits:
feedSortable:
queryParameters:
sortBy:
description: Sort the topic feed
required: false
default: 'created_at'
...
0
votes
0answers
26 views
How does RestAssured API testing tool handle RAML
I was wondering how does RestAssured handle RAML?
We have apis developed using RAML spec and I am in search of a tool that we could use for test automation. I know RestAssured, so, it was my ...
0
votes
0answers
64 views
Dynamic replacement of property name in the raml mulesoft 4.0
I have one dataType which exist in the RAML file with around 50 fields and it has inner element as object also now I would like to have another dataType with similar details but property name should ...
0
votes
0answers
24 views
Dynamic RAML into Swagger
I've got the following RAML code:
#%RAML 1.0
---
title: Data API
baseUri: http://www.baseuri.com
version: v1
uses:
DataLib: libraries/data.raml
resourceTypes:
collection:
/<<name>&...
0
votes
1answer
28 views
RAML Merge descriptions
Suppose we have a type Book declared as
type: object
properties:
bookId:
type: StringId
description: Book identifier
And a type StringId
type: string
description: UTF-8 string, max length ...
0
votes
0answers
20 views
Execution failed for task ':jaxrstoraml'. > com.google.common.collect.FluentIterable.of([Ljava/lang/Object;)Lcom/google/common/collect/FluentIterable;
I am trying to run a Gradle task which generates RAML from jaxrs application. While trying to generate I get the error:
com.google.common.collect.FluentIterable.of([Ljava/lang/Object;)Lcom/google/...
1
vote
2answers
671 views
Validating query parameters in RAML
I need to create an API that has four possible HTTP query parameters. Either parameter one or parameter two is required. The others are optional. From the official RAML version 1.0 specification on ...
0
votes
1answer
93 views
Mule 4 - Return error if passing payload request parameter that was not defined in the raml
just to check is it possible to return an error if the user passed the parameter that was not defined in the api raml? For eg, below is my defined body payload structure in my api raml
{
"test1&...
0
votes
1answer
160 views
RAML for multiple files as output
I am new to RAML 1.0 I want to mention multiple csv files as response.
My API will be creating multiple csv file for different entities.
I want to mention this multiple file in response in RAML. Can ...
0
votes
1answer
172 views
How I can mention file as response in RAML 1.0
How I can mention file as response in RAML in RAML 1.0
Example: My Mule API is creating file from sql data so How I can mentioned file as response.
I am writing RAML for creating file from sql data?
...
0
votes
0answers
58 views
I have been reading through the specification, but I canāt understand the part about “ XML Serialization of Type Instances”
Using MuleSoftās API designer I have been trying to test the example given in the specification, using the following code:
main.raml
#%RAML 1.0
title: test
version: 1
types:
Person: !include ...
0
votes
0answers
18 views
Mulesoft - custom auth 2.0 provider, token validation in api specification
i have a module created with Anypoint Studio and deployed in CloudHub. This small project , an auth. provider, return a token after a user successfully login.
Inside my api specifications raml, i ...
0
votes
1answer
128 views
why API Validation for multipart/form-data not working in anypoint studio 6?
In design center, all the validation works successfully like text field is missing file attached is not JSON format but in studio 6, all these validations failed.
Can anybody answer why this happen ...
0
votes
1answer
664 views
Properly create a RAML 1.0 Named Example
I am using RAML 1.0 to specify an API, but having trouble working with the Named Example fragment type. I've looked at numerous tutorials and examples, but cannot find a definitive guide to what's ...
0
votes
0answers
140 views
ClassCastException : class org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine$2 cannot be cast to class MyResponse
I am using raml-to-jaxrs-maven-plugin:3.0.7 to generate jax-rs client from a raml file. I am using RESTEasy as the implementation of the Jakarta RESTful Web Services.
The generated proxy from raml ...
0
votes
1answer
26 views
RAML inside MULE (3.x) anypoint studio is giving a null payload
RAML inside MULE (3.x) anypoint studio is giving a null payload due to http://www.mulesoft.org/schema/mule/apikit/current/mule-apikit.xsd is not found. Why was it removed? Any alternatives?
0
votes
0answers
41 views
OAuth2 in RAML 1.0 The header authentication is mandatory to be bearer?
I'm creating an OAuth2 securityScheme in an RAML 1.0 spec, i have all the steps to have the token, but when i use the token, the endpoint just receives a basic authentication. My question is if there ...
0
votes
0answers
21 views
RAML spec - append to existing headers and payload
I am creating an app that needs to update the incoming request with additional information. That is, it will add an additional header on top of all incoming headers, and add few more things in the ...
0
votes
1answer
30 views
Appending type data inline
In my use case I have a RAML 1.0 library created by our R&D department that contains definition of multiple data types. Those data types are defined in a generic, parametrized manner so when I ...
0
votes
1answer
57 views
How to include/exclude API block in RAML output dynamically
I'm just curious to understand what are the possibilities are excluding/including endpoint(s) in the documentation generated from a RAML.
For example, given
#%RAML 1.0
baseUri: https://api.mybanks....
0
votes
0answers
2k views
Is there any tool available to convert OAS 3.0 to OAS 2.0 or RAML?
I have a UI that generates OAS 3.0 json and my api manager supports OAS 2.0. Is there anyway to convert OAS 3.0 to OAS 2.0? I do not have control over UI so I have to take the JSON as it is and ...
1
vote
0answers
260 views
AMF parser issue
When using Advanced Rest Client I am getting an error when I try to download one of my projects from Anypoint Exchange. It is a REST asset written in RAML. The mocking service works correctly and the ...
0
votes
0answers
112 views
How to import a RAML file into a project?
I downloaded this plugin from the marketplace to import RAML files into my project. To test the plugin I used a file with the following content:
#%RAML 1.0
title: REST Services API
version: v1
...
1
vote
2answers
330 views
Namespace in RAML file
I'm facing some problems trying to create a RAML unsing Library to define the types for a XML. Looks like is propagating the prefix to all the atributes.
the library is like this:
#%RAML 1.0 Library
...
0
votes
1answer
234 views
create branches in anypoint design center to modify the RAML changes
I want to create branches for modifying the exisiting raml,
can any one help me how to create a new branch before modifying new changes directly to the master instead I can create feature branch or ...
0
votes
1answer
70 views
either/or body properties and multiple examples
I am new to RAML and recently inherited a project I need to update to reflect new specifications.
This is a fairly simple RAML document, all I am doing is adding a new body property, and I would like ...
0
votes
1answer
362 views
Using pattern properties with additionalProperties: false
I have the requirement to specify an API in raml where the object properties have to be specified otherwise the validation should fail. This is achieved by additionalProperties: false.
In addition I ...
0
votes
1answer
54 views
Can a specific property / field be restricted from JavaDocs generation?
I have a few Java classes containing one or more properties that I would like to exclude from the JavaDocs when they are generated. I am using the 'maven-javadoc-plugin' and cannot find any ...
0
votes
1answer
61 views
Can I include code examples in RAML documentation?
Is it possible to include code snippets in a RAML file, like examples of how to use each endpoint in different languages?
Ideally, something like this:
/account:
post:
description: Create an ...
2
votes
0answers
284 views
How to get ResponseType<?> from openapi 3
We are currently migrating some old rest interfaces from RAML to OpenAPI 3.
In the RAML file an HTTP delete operation has the response defined with empty body as follows:
delete:
responses:
204:...
1
vote
2answers
70 views
RegEx pattern for comma separated 10 currencies in URI parameter [closed]
I need to pass a list of comma separated currencies as URI parameter.
I need a regEx to allow only capital letters in group of three, separated by comma, and that does not allow any white space ...
0
votes
1answer
93 views
How to define RAML spec to accept all URI params following a specific path
I am defining a RAML spec for my Mule application.
This is the end point:
/client/{clientId}/resource/PATH1/PATH2/PATH-N
There can be any number of path pariables-'PATH' s- after the /resource.
...
0
votes
1answer
112 views
How do I combine 'nil' and an !Included datatype?
I am defining a RAML 1.0 datatype with property that can be 'nil.' The type of that property is an !included datatype which, whilst not giving any errors in the datatype definition causes the root ...
0
votes
1answer
960 views
How can merge branch into master in MuleSoft (Anypoint design center)
We have created multiple RAML file in Design Center (Anypoint Platform - Mulesoft). We are working in team so multiple users can edit that RAML file by creating separate branch. Now I want to merge ...
0
votes
1answer
228 views
How can a resourceType inherit from multiple types?
Goal: create resourceTypes for CRUD endpoints without repeating myself.
(working with RAML 1.0 in Anypoint Studio and Mulesoft Design Center)
Let's start a couple resourceTypes for single action ...
1
vote
0answers
73 views
How to specify API request header value in RAML
Using RAML 1.0, I'd like to specify the value that a request header should have. The specification seems to only mention properties of the header
/foo-resources:
post:
description: Creates a ...