You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/12/15 02:29:23 UTC

[GitHub] [apisix] membphis commented on a diff in pull request #8522: docs: Add new tutorial for managing multiple API version

membphis commented on code in PR #8522:
URL: https://github.com/apache/apisix/pull/8522#discussion_r1048209453


##########
docs/en/latest/tutorials/add-multiple-api-versions.md:
##########
@@ -0,0 +1,227 @@
+---
+title: Add multiple API versions
+keywords:
+  - API Versioning
+  - Multiple APIs
+  - Proxy rewrite
+  - Request redirect
+  - Route API requests
+description: In this tutorial, you will learn how to _publish and manage multiple versions of your API_ with Apache APISIX.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## What is API versioning?
+
+**API versioning** is the practice of managing changes to an API and ensuring that these changes are made without disrupting clients. A good API versioning strategy clearly communicates the changes made and allows API consumers to decide when to upgrade to the latest version at their own pace.
+
+## Types of API Versioning
+
+#### URI Path
+
+The most common way to version an API is in the URI path and is often done with the prefix "v". This method employs URI routing to direct requests to a specific version of the API.
+
+```shell
+http://org.apisix/v1/hello

Review Comment:
   I think we should use `apisix.org` here, all right?



##########
docs/en/latest/tutorials/add-multiple-api-versions.md:
##########
@@ -0,0 +1,227 @@
+---
+title: Add multiple API versions
+keywords:
+  - API Versioning
+  - Multiple APIs
+  - Proxy rewrite
+  - Request redirect
+  - Route API requests
+description: In this tutorial, you will learn how to _publish and manage multiple versions of your API_ with Apache APISIX.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## What is API versioning?
+
+**API versioning** is the practice of managing changes to an API and ensuring that these changes are made without disrupting clients. A good API versioning strategy clearly communicates the changes made and allows API consumers to decide when to upgrade to the latest version at their own pace.
+
+## Types of API Versioning
+
+#### URI Path
+
+The most common way to version an API is in the URI path and is often done with the prefix "v". This method employs URI routing to direct requests to a specific version of the API.
+
+```shell
+http://org.apisix/v1/hello
+http://org.apisix/v2/hello
+```
+
+#### Query Params
+
+In this method, the version number is included in the URI, but as a query parameter instead of in the path.
+
+```shell
+http://org.apisix/hello?version=1

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org