Hi,
When editing files in the API Design Center, files keep getting autosaved and auto committing to our GitHub-connected repo. How do I disable that by default, so the developer gets to personalize their commit message and etc?
Thanks
Hi,
When editing files in the API Design Center, files keep getting autosaved and auto committing to our GitHub-connected repo. How do I disable that by default, so the developer gets to personalize their commit message and etc?
Thanks
i can't lose all the jobs i've done with my old account. Please can you verify why i can't access? the user is "afatone-axle" and was created with my company's mail address.
what i did :
anypoint > designcenter > create app >
* add http listener with path : /hello and method GET
* add logger
deploy application at the top
after it's deployed i click the dots at the right and copy-link
in the new browser window past the url and add the path /hello to it.
this gives the next error :
502 Bad Gateway
We couldn't find any Cloudhub application listening on this API.
when i test the application with a non-existing path :
http://my-app.cloudhub.io/hellotest
error : No listener for endpoint: /hellotest
so something is deployed
at the bottom-left i also don't see anything weird in the log
at management center > runtime manager i also see the app deployed
default environment is sandbox.
anyone knows what could be going wrong ?
and maybe even more usefull, any place where i could error track these kind of situations ?
Hello Rajeev,
This gives me the same error.
The application url over there is the same as the copy-link i used.
In the runtime manager the app is deployed in DESIGN and status is started.
I already stop/started it, doesn't help either
I do see in the log it has worked for 1 invoke, after that i constantly gives me the same error again.
I am creating REST API for that i designed a RAML file which just get the details from database and post/insert the new contacts into it.My issues are:
1. I am getting all the table details but unable to get specific user details.
2. Unable to insert the new contact details to the database using post method.
3. Need a query so that i can insert the data into DB.
how to call a mule flow from java web application. My requirement is i have a form requesting for something when i submit the form i need to trigger the mule application how i need to trigger the application.
please help me out ASAP..
thanks in advance.
@tharunvfx This is very simple to implement.
You can expose your mule application as an API which will get the data as an input and get triggered.
Whenever you submit the web form, you will post the data to the mule application with the service url and the mule application will automatically be called and triggered.
For example, let us assume, your Mule API has following url:
Now you can POST and submit the data to this url from the web form and the Mule application will be triggered and received the form data as input payload
I am unable to decide how to use the design center. There are 3 options
Mule app
API specification
API fragment (trait, resource type, liberary, data type, user documentation, example, annotation type, security scheme)
I do not know which of these would give the editor options in the define api in the api designer explained here
Design Center is environment for designing Mule applications and API definitions in the cloud.
Go through the docs here :.
We are trying to use free jars of mule and host it in a standalone java web application (hosted on an in-house tomcat server). The web-application has some web-pages, apis. In one api call, we would like to call a mule flow with passed values. We are able to host the mule flow as a war, but when we try to package them with the existing web-app, we can not find how to call it. Sample simple flow is like this -
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="SampleFlow">
<logger message="===============Logging from Mule Flow =================== # [payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
And we want to call this `SampleFlow` inside a java method so that when `executeFlow()` is called, the `logger` component prints the message with the given `inputValue` as a payload. What we were trying is like this -
import org.mule.api.MuleContext;
import org.mule.api.MuleException;
import org.mule.api.config.ConfigurationException;
import org.mule.api.lifecycle.InitialisationException;
import org.mule.config.spring.SpringXmlConfigurationBuilder;
import org.mule.context.DefaultMuleContextFactory;
public class ......
{
.....
public executeFlow(String inputValue)
{
String wsStatus = "Received";
....
DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
SpringXmlConfigurationBuilder configBuilder;
MuleContext muleContext = null;
try {
configBuilder = new SpringXmlConfigurationBuilder("SampleFlow.xml");
muleContext = muleContextFactory.createMuleContext(configBuilder);
muleContext.start();
[Something would be here to call SampleFlow]
} catch (InitialisationException | ConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MuleException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
We do put the following lines in the `web.xml`.
<context-param>
<param-name>org.mule.config</param-name>
<param-value>http_test.xml</param-value>
</context-param>
<listener>
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>
@plymouth_rock You need to get the flow name in your Java class :-
muleContext.getRegistry().lookupFlowConstruct("Your flow name");
Then you can call and process the flow in your java class:-
MuleEvent muleEvent= new DefaultMuleEvent(new DefaultMuleMessage(null,muleContext),MessageExchangePattern.REQUEST_RESPONSE,flowCon);
muleEvent.getMessage().setPayload("your payload");
response = flow.process(muleEvent);
I have an API Specification designed in YAML using OAS 3.0.3. One field ex: customerId is defined as array of strings as below.
​
I want to pass comma separated values in the customerId field as part of query parameters. Ex: ?customerId='594918104','037833100','023135106'
​
That is the reason, style is set to "form" and explode to "false".
Reference from here: Describing Parameters (swagger.io)
​
name: customerId
in: query
description: Customer ID
required: false
schema:
type: array
items:
type: string
pattern: "^[A-Z0-9]+$"
minLength: 9
maxLength: 9
maxItems: 100
style: form
explode: false
example: ['594918104','037833100','023135106']
​
APIKit throws an error when I pass comma separated values in the customerId field. It works only if I repeat the query parameter name for each value. Same behavior when I test it using Mocking Service in Design Center.
ex: ?customerId=594918104&customerId=037833100&customerId=023135106
​
I do not want to repeat the key since the URL will get too long and it can potentially contain 100 values. That's why I am looking for passing the values with comma separated.
​
​Expected Behavior: ?customerId='594918104','037833100','023135106'
​
​
Appreciate for any help you can provide.
​
​
Exists in RAML definition any naming convention for the values in a enum definition?
Looking for the same information in Open API, it seems in examples provided that the convention is lower case and in Google API or GIT Hub API, seems to be upper underscore definition.
Thanks
Hello @RAUL DEL RIO LOPEZ​
RAML (RESTful API Modeling Language) and OpenAPI are both specifications for defining APIs. They provide ways to describe resources, methods, parameters, and responses so that both client-side and server-side developers have clear and standardized documentation. When it comes to enum naming conventions, neither RAML nor OpenAPI enforces a specific naming convention for enum values. The naming often relies on the conventions used within the organization or the specific use case.
However, here are some common practices:
Lowercase- As you observed, many examples in OpenAPI use lowercase for enum values. This might be influenced by some programming languages or JSON standards where lowercase is a common convention for string literals.
Example:
parameters:
name: status
in: query
schema:
type: string
enum: [active, inactive, archived]
Similarly you can use UPPER_SNAKE_CASE and Camel Case.
When deciding on a naming convention for your enum values in RAML or OpenAPI:
Is it possible to use external SSO?