Skip to content

Commit

Permalink
Merge pull request #2848 from mulesoft/RH-APID-Revision
Browse files Browse the repository at this point in the history
Pull in the rewritten topics for API Designer
  • Loading branch information
fermujica authored Jul 10, 2018
2 parents afae632 + d37cc92 commit 3788f87
Show file tree
Hide file tree
Showing 24 changed files with 604 additions and 191 deletions.
3 changes: 1 addition & 2 deletions api-functional-monitoring/v/latest/bat-workflow-test.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ You can test any REST API, such as the Deck of Cards API, which is deployed on a

This workflow covers everything from creation to testing and test reporting of a simplified API. After you create and deploy the API on Anypoint Platform, you can create a simple hello world test suite.

. link:/design-center/v/1.0/design-raml-api-task[Design an API to test]. For example, design the RAML API specification in Design Center.
. link:/design-center/v/1.0/publish-project-exchange-task[Publish the API to Exchange].
. link:/design-center/v/1.0/design-create-publish-api-specs[Design an API to test and publish it to Anypoint Exchange].
. link:/api-manager/manage-exchange-api-task[Manage the API in API Manager].
. link:/api-manager/proxy-deploy-cloudhub-latest-task[Deploy a Proxy, for example, to CloudHub]
. link:/api-functional-monitoring/bat-write-tests-task[Configure and write BAT tests].
Expand Down
2 changes: 1 addition & 1 deletion api-manager/v/1.x/design-raml-api-task.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ baseUri: http://jsonplaceholder.typicode.com
== See Also
* link:/design-center/v/1.0/designing-api-about[About Designing a RAML-based API in Design Center]
* link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment]
* link:/api-manager/v/1.x/tutorial-set-up-an-api[Set up an API]
* link:/getting-started/api-lifecycle-overview
3 changes: 1 addition & 2 deletions api-manager/v/1.x/test-alert-task.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ This procedure describes how to test a request count alert. This procedure requi
== See Also

* link:/api-manager/v/1.x/add-api-alert-task[To Add an API Alert]
* link:/design-center/v/1.0/designing-api-about[About Designing a RAML-based API]
* link:/design-center/v/1.0/publish-project-exchange-task[To Publish an API Design Project]
* link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment]
2 changes: 1 addition & 1 deletion api-manager/v/2.x/latest-overview-concept.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ API Manager leverages the runtime capabilities of API Gateway, which enforces po

* https://www.mulesoft.com/resources/api/secure-api-gateway[API Gateway: Why you need flexible deployment]
* link:/api-manager/v/2.x/api-auto-discovery-new-concept[Auto-discovery process]
* link:/design-center/v/1.0/designing-api-about[About Designing a RAML-based API]
* link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment]
* link:/anypoint-exchange/to-create-an-asset[Anypoint Exchange]
3 changes: 1 addition & 2 deletions api-manager/v/2.x/test-alert-task.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ This procedure describes how to test a request count alert. This procedure requi
== See Also

* link:/api-manager/v/2.x/add-api-alert-task[To Add an API Alert]
* link:/design-center/v/1.0/designing-api-about[About Designing a RAML-based API]
* link:/design-center/v/1.0/publish-project-exchange-task[To Publish an API Design Project]
* link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment]
4 changes: 2 additions & 2 deletions api-manager/v/2.x/workflow-download-configure-4-proxy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In this workflow, you put an asset in place in Exchange, or design an API in Exc
. Create an API asset in, or design and publish one to, Exchange:
+
* WSDL, HTTP, or HTTPS API: In Exchange, link:/anypoint-exchange/to-create-an-asset[create an asset], selecting the asset type that corresponds to the type of proxy.
* RAML API: In Design Center, link:/design-center/v/1.0/design-raml-api-task[design an API Specification] and link:/design-center/v/1.0/publish-project-exchange-task[publish the API design project to Exchange]. Alternatively, link:/design-center/v/1.0/upload-raml-task[upload an existing RAML to Exchange].
* RAML API: In Design Center, link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment]. Alternatively, link:/design-center/v/1.0/upload-raml-task[upload an existing RAML to Exchange].
. link:/api-manager/v/2.x/proxy-deploy-cloudhub-latest-task[Deploy the Mule 4 proxy to CloudHub] or link:/api-manager/v/2.x/proxy-deploy-hybrid-latest-task[deploy the Mule 4 proxy to Hybrid].

////
Expand All @@ -19,4 +19,4 @@ In this workflow, you put an asset in place in Exchange, or design an API in Exc

* link:/api-manager/v/2.x/proxy-latest-concept[About Mule 4 Proxies]
* link:/api-manager/v/2.x/wsdl-raml-http-proxy-reference[Mule 4 Proxy Request Handling]
* link:/api-manager/v/2.x/proxy-advantages[Mule 4 Proxy Advantages]
* link:/api-manager/v/2.x/proxy-advantages[Mule 4 Proxy Advantages]
2 changes: 1 addition & 1 deletion apikit/v/3.x/start-project-task.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Now, you are ready to run the API.
== See Also

* link:/apikit/v/3.x/apikit-run-test[To Run and Test an APIkit Project]
* link:/design-center/v/1.0/design-raml-api-task[Design a RAML API specification] in Design Center
* link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment] using Design Center.
2 changes: 1 addition & 1 deletion apikit/v/4.x/start-project-task.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ Now, you are ready to run the API.
== See Also

* link:/apikit/v/4.x/run-apikit-task[To Run an APIkit Project]
* link:/design-center/v/1.0/design-raml-api-task[Design a RAML API specification] in Design Center.
* link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment] using Design Center..
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified design-center/v/1.0/_images/publish-to-exchange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 12 additions & 30 deletions design-center/v/1.0/_toc.adoc
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
// TOC File
* link:/design-center/v/1.0/[Design Center]
** link:/design-center/v/1.0/to-create-a-new-project[To Create a Design Center Project]
** link:/design-center/v/1.0/designing-api-about[RAML API Design]
*** link:/design-center/v/1.0/design-api-v-concept[Visual Design]
**** link:/design-center/v/1.0/design-raml-api-v-task[To Design an API Specification]
**** link:/design-center/v/1.0/design-data-type-v-task[To Design a Data Type]
**** link:/design-center/v/1.0/design-resource-v-task[To Design a Resource]
**** link:/design-center/v/1.0/publish-and-test-v-task[To Simulate Calling the API (Mocking) in Visual Mode]
**** link:/design-center/v/1.0/publish-project-exchange-task[To Publish an API Design Project]
**** link:/design-center/v/1.0/group-resource-v-task[To Group Resources and Data Types in Visual Mode]
**** link:/design-center/v/1.0/exit-visual-edit-task[To Exit Visual Design Mode]
*** link:/design-center/v/1.0/design-api-basics-tasks[Basic API Design Tasks (Code View)]
**** link:/design-center/v/1.0/design-raml-api-task[To Design a RAML API Specification (Code View)]
**** link:/design-center/v/1.0/simulate-api-task[To Simulate Calling a RAML API (Mocking)]
**** link:/design-center/v/1.0/publish-project-exchange-task[To Publish an API Design Project]
**** link:/design-center/v/1.0/design-import-oas-task[To Import an OAS]
*** link:/design-center/v/1.0/design-api-key-tasks[Key API Design Tasks]
**** link:/design-center/v/1.0/create-reuse-part-task[To Create and Publish an API Fragment]
**** link:/design-center/v/1.0/add-dependencies-task[To Add a Fragment to an API]
**** link:/design-center/v/1.0/design-update-remove-dep-task[To Remove or Update a Dependency]
**** link:/design-center/v/1.0/design-import-raml-task[To Import a RAML]
**** link:/design-center/v/1.0/export-api[To Export an API from Design Center]
**** link:/design-center/v/1.0/upload-raml-task[To Upload an Existing RAML File to Exchange]
**** link:/design-center/v/1.0/design-manage-revisions-task[To Manage API Revisions Using Branches]
**** link:/design-center/v/1.0/group-resource-task[To Group Resources and Data Types]
*** link:/design-center/v/1.0/design-api-ui-reference[Designing an API Reference]
*** link:/design-center/v/1.0/mocking-reference[Simulating Calls to the API (Mocking) Reference]
*** link:/design-center/v/1.0/designing-api-reference[OAS/RAML Importing and Exporting Reference]
*** link:/design-center/v/1.0/design-api-frag-revisions-concept[About API Fragments]
*** link:/design-center/v/1.0/design-branch-filelock-concept[About Sharing Work and Project Locking]
** link:/design-center/v/1.0/design-create-publish-api-specs[Create and Publish an API Specification or API Fragment]
*** link:/design-center/v/1.0/design-create-publish-api-visual-editor[Create and Publish an API Specification with the Visual Editor]
*** link:/design-center/v/1.0/design-create-publish-api-raml-editor[Create and Publish an API Specification with the Code Editor]
**** link:/design-center/v/1.0/design-raml-api-task[Example: Create an API Specification with the Code Editor in Design Center]
**** link:/design-center/v/1.0/design-example-raml-editor-spec[Example API Specification]
**** link:/design-center/v/1.0/design-branching[Fork an API Project]
*** link:/design-center/v/1.0/design-mocking-service[Simulate Calls to an API]
*** link:/design-center/v/1.0/design-create-publish-api-fragment[Create and Publish an API Fragment]
*** link:/design-center/v/1.0/design-import-files[Import Files into an API Project]
*** link:/design-center/v/1.0/design-export-files[Export Files from an API Project]
*** link:/design-center/v/1.0/design-add-api-dependency[Add an API Fragment to an API Project as a Dependency]
*** link:/design-center/v/1.0/upload-raml-task[Upload an Existing RAML File to Exchange from Design Center]
*** link:/design-center/v/1.0/spec-api-public-exchange[API Specification for MuleSoft Connectivity Ecosystem]
** link:/design-center/v/1.0/about-designing-a-mule-application[Mule Flow Design]
Expand Down
33 changes: 33 additions & 0 deletions design-center/v/1.0/design-add-api-dependency.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
= Add an API Fragment to an API-Specification Project as a Dependency

In projects for API specifications or API fragments, you can add API fragments as dependencies directly from Anypoint Exchange.

== About this task

The fragments are listed in your projects, but they are not present in your projects. Instead, the code editor references them from their online location in Anypoint Exchange. Therefore, although you can include them in your specifications and fragments, you cannot edit them.

If you export your project, the resulting `.zip` file contains the referenced API fragments. Whenever someone downloads your project as RAML after it is published to Anypoint Exchange, the resulting `.zip` file again contains the referenced API fragments.

If you export your project to work on it in another editor, edit the referenced API fragments, then try to import the project back into the code editor, the import will fail.


== Procedure

. On the left side of the editor, click the *Exchange dependencies* icon, which looks like this:
+
image::publish-to-exchange.png[title="Publish to Exchange icon",46,52,align="left"]
. Click the plus sign that is at the top of the left pane.
. Select the API fragments that you want to import. You can select from API fragments that are visible to the organizations that you belong to.


== Result
The API fragments that you selected are listed in the left pane. You can view their contents by selecting them. When you are ready to continue work on your project, click the *Files* icon.

The files appear in the folder `exchange-modules`. Within this folder are subfolders that correspond to the parts of the URI for the referenced API fragment.

[NOTE]
====
If after you add a dependency on an API fragment an updated version of the fragement is published, and if you want your project to reference the updated version, you must update the dependency. To do so, click the *Exchange dependency* icon, click the dependency, and select *Change version*. In the *Change version* dialog, select the current version.
====
27 changes: 27 additions & 0 deletions design-center/v/1.0/design-branching.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
= Fork a Project in the RAML Editor

You can separate new iterations of a project from previous iterations by branching.

== About this task

A new branch is a fork of your project and cannot be merged back into the master branch. Anybody who has access to your project can also create branches.

Even when there are forks of a project, when you open that project the editor opens it to the master branch. If you want to return to a fork that you were working in, you must select that fork.

You can publish any fork of an API specification to Anypoint Exchange.

== Procedure

* To fork a project:
+
. Open the project.
. Click “master” at the top of the code editor.
. Type a name in the search field and type *Enter*.
+
*Result:* The code editor automatically switches to the new fork.

* To work in a fork of a project:
+
. Open the project.
. Click “master” at the top of the code editor.
. Select the name of the fork that you want to work in.
65 changes: 65 additions & 0 deletions design-center/v/1.0/design-create-publish-api-fragment.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
= Create and Publish an API Fragment in the Code Editor in Design Center

You can create API fragments directly in RAML with the help of code suggestions that appear within the code editor.


== About this task

An API fragment is a RAML document that has a version and an identifier, but is not in itself a complete RAML specification. An API fragment is one of the following types defined by RAML.org:

* Trait

* Resource Type

* Library

* Type

* User Documentation

* Example

* Annotation Type

* Security Scheme

== Procedure

. On the *Projects* page in Design Center, click *Create* and select *API Fragment*.
. In the *New API Fragment* dialog, type a name for the project and select the type of API fragment that you want to create. Then, click *Create*.
+
_Result:_ The code editor opens. The editor is divided into three panels:
+
* The left panel lists the files in your project. By default, the editor creates a `.raml` file that has the same name as the project.
+
[TIP]
====
You can create more than one API specification in a single project. If you want to include additional API specifications in your project, click the plus sign in the Files panel to create a new file or click the dots that are next to the plus sign to import a file.
====
* The central panel displays the editor in which you create your API fragment.
* The right panel lists the types and resources that are in the API fragment that is displayed in the central panel.

. Draft your API fragment.
+
As you draft, the code editor suggests RAML nodes, methods, and other elements that you can add at the location of your cursor.
+
You can import files into your project, either separately or bundled together in .zip files. The files can be RAML 1.0 files, JSON files, or OpenAPI Specification (OAS) 2.0 files. The files can be on your computer or you can specify a URL for them if they are located online.
+
For more information about importing files and steps for how to import them, see "Import Files into an API Project", which is linked to from the *See also* section at the end of this topic.



== What to do next

You can publish the API fragment to Anypoint Exchange. Click the icon that is in the top-right corner of the code editor to open the *Publish API specification to Exchange* dialog. The icon looks like this:

image::publish-to-exchange.png[title="Publish to Exchange icon",46,52,align="left"]

The fragment can then be included as a dependency in an API-specification project. After revising a fragment, update API specifications that use the fragment to include the new version.

== See also

* link:/design-center/v/1.0/design-import-files[Import Files into an API Project]
72 changes: 72 additions & 0 deletions design-center/v/1.0/design-create-publish-api-raml-editor.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
= Create and Publish an API Specification with the Code Editor in Design Center

You can create API specifications directly in RAML with the help of code suggestions that appear within the code editor.

== Before you begin
Within Anypoint Platform, you must be assigned the _Design Center Developer_ permission.
// What guidance can I give for designing an API specification before using the API Designer?

== About this task

An API specification that is written in RAML typically includes the following things:

* An optional baseURI node at the root of the RAML document
+
If you don’t have an implementation of the API and cannot provide a baseURI, you can still test the API using the mocking service baseURI described below.

* API resources, for example the collection of all customers or a specific customer

* HTTP methods, such as GET, POST, PUT, and DELETE, allowed on each resource

* The representation of the request and response messages for each method,

== Procedure
. On the *Projects* page in Design Center, click *Create* and select *API Specification*.
. In the *New API Specification* dialog, name your project and select the option *Start with API Designer* to use the code editor.
+
_Result:_ The code editor opens. The editor is divided into three panels:
+
* The left panel lists the files in your project. By default, the editor creates a `.raml` file that has the same name as the project.
+
[TIP]
====
You can create more than one API specification in a single project. If you want to include additional API specifications in your project, click the plus sign in the Files panel to create a new file or click the dots that are next to the plus sign to import a file.
====
* The central panel displays the editor in which you create the API specification. Appearing in the editor when you create a project or start a new API specification are the first two lines of a valid `.raml` file.
* The right panel lists the types and resources that are in the API specification that is in the central panel.

. Draft your API specification.
+
As you draft, the code editor suggests RAML nodes, methods, and other elements that you can add at the location of your cursor.
+
You can also perform these tasks:
+
Import files and API fragments into your project:: You can import files, either separately or bundled together in .zip files. The files can be RAML 1.0 files, JSON files, or OpenAPI Specification (OAS) 2.0 files. The files can be on your computer or you can specify a URL for them if they are located online.
+
For more information about importing files and steps for how to import them, see "Import Files into an API Project", which is linked to from the *See also* section at the end of this topic.
+
For information about adding API fragments to your project, see "Add an API Fragment to an API-Specification Project as a Dependency", which is linked to from the *See also* section at the end of this topic.
+
Simulate calls to your API:: Even while you are drafting an API specification, you can simulate calls to endpoints for which you have specified
+
* An HTTP status code the API returns, if successful
* An example of data the actual implementation would return
+
For more information, view the topic "Simulate Calls to an API", which is linked to from the *See also* section at the end of this topic.

Export your API project:: At any time, you can export your project as a `.zip` file, or an API specification from RAML to OAS 2.0. For more information, view the topic "Export Files from an API Project", which is linked to from the *See also* section at the end of this topic.

== What to do next
Publish your API specification to Exchange. Click the icon that is in the top-right corner of the code editor to open the *Publish API specification to Exchange* dialog. The icon looks like this:

image::publish-to-exchange.png[title="Publish to Exchange icon",46,52,align="left"]


== See also
* link:/design-center/v/1.0/design-export-files[Export Files from an API Project]
* link:/design-center/v/1.0/design-import-files[Import Files into an API Project]
* link:/design-center/v/1.0/design-add-api-dependency[Add an API Fragment to an API-Specification Project as a Dependency]
* link:/design-center/v/1.0/design-mocking-service[Simulate Calls to an API]
Loading

0 comments on commit 3788f87

Please sign in to comment.