Skip to content

Commit

Permalink
feat:v2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
netweng committed Jan 3, 2023
1 parent 5085a50 commit 2e368fc
Show file tree
Hide file tree
Showing 22 changed files with 134,729 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: api
slug: /api
hide_title: true
---

import App from '../../../../swagger/App';

<App />

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_position: 1
id: download
slug: /download
title: SDK Overview
---
import Download from '../../download.md';

<Download
java_url="https://github.com/smartxworks/cloudtower-java-sdk/releases/tag/v2.5.0"
go_url="https://github.com/smartxworks/cloudtower-go-sdk/releases/tag/v2.5.0"
python_url="https://github.com/smartxworks/cloudtower-python-sdk/releases/tag/v2.5.0"
node_url="https://github.com/smartxworks/cloudtower-node-sdk/releases/tag/v2.5.0"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
hide_title: true
id: go-sdk
slug: /go-sdk
---

import Go, { toc as goToc } from '../../go.md'

<Go />

export const toc = [...goToc]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: intro
slug: /
hide_title: true
---
import Intro, { toc as introToc } from '../../intro.md'
import GetToken from '../../../../code_blocks/GetToken.md'
import GetTokenResponse from '../../../../code_blocks/GetTokenResponse.md'
import GetVm from '../../../../code_blocks/GetVm.md'
import CreateVmSnapshot from '../../../../code_blocks/CreateVmSnapshot.md'
import GetTask from '../../../../code_blocks/GetTask.md'
import GetVmSnapshot from '../../../../code_blocks/GetVmSnapshot.md'
import GetLunSnapshot from '../../../../code_blocks/GetLunSnapshot.md'

<Intro components={{
GetToken,
GetTokenResponse,
GetVm,
CreateVmSnapshot,
GetTask,
GetVmSnapshot,
GetLunSnapshot,
}}/>

export const toc = [...introToc ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
hide_title: true
id: java-sdk
slug: /java-sdk
---

import Java, { toc as javaToc } from '../../java.md'

<Java />

export const toc = [...javaToc]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
hide_title: true
id: python-sdk
slug: /python-sdk
---

import Python, { toc as pythonToc } from '../../python.md'

<Python />

export const toc = [...pythonToc]
9 changes: 7 additions & 2 deletions cloudtower-api-doc/scripts/build-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ const initI18n = () => {
const zh2_4API = require('../swagger/locales/zh/v2.4.0.json');
const en2_4API = require('../swagger/locales/en/v2.4.0.json');

const zh2_5API = require('../swagger/locales/zh/v2.5.0.json');
const en2_5API = require('../swagger/locales/en/v2.5.0.json');

i18next.init({
resources: {
[SupportLanguage.en]: {
Expand All @@ -272,6 +275,7 @@ const initI18n = () => {
['v2_2_0']: en2_2API,
['v2_3_0']: en2_3API,
['v2_4_0']: en2_4API,
['v2_5_0']: en2_5API,
components: enComponents,
},
[SupportLanguage.zh]: {
Expand All @@ -283,20 +287,21 @@ const initI18n = () => {
['v2_2_0']: zh2_2API,
['v2_3_0']: zh2_3API,
['v2_4_0']: zh2_4API,
['v2_5_0']: zh2_5API,
components: zhComponents,
},
},
lng: SupportLanguage.zh,
updateMissing: true,
fallbackLng: [SupportLanguage.en, SupportLanguage.zh],
fallbackNS: ['v1_8_0','v1_9_0','v1_10_0', 'v2_0_0', 'v2_1_0','v2_2_0', 'v2_3_0', 'v2_4_0'],
fallbackNS: ['v1_8_0','v1_9_0','v1_10_0', 'v2_0_0', 'v2_1_0','v2_2_0', 'v2_3_0', 'v2_4_0', 'v2_5_0'],
interpolation: {
prefix: "{",
suffix: "}",
escapeValue: false,
},
keySeparator: false,
ns: ['v1_8_0', 'v1_9_0', 'v1_10_0','v2_0_0', 'v2_1_0', 'v2_2_0', 'v2_3_0', 'v2_4_0','components'],
ns: ['v1_8_0', 'v1_9_0', 'v1_10_0','v2_0_0', 'v2_1_0', 'v2_2_0', 'v2_3_0', 'v2_4_0', 'v2_5_0','components'],
nsSeparator: ".",
load: "currentOnly",
react: {
Expand Down
10 changes: 8 additions & 2 deletions cloudtower-api-doc/swagger/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ import zh2_4API from './locales/zh/v2.4.0.json';
import en2_4API from './locales/en/v2.4.0.json';


import zh2_5API from './locales/zh/v2.5.0.json';
import en2_5API from './locales/en/v2.5.0.json';


export type ApiDoc = {
summary: string;
description: string;
Expand All @@ -48,6 +52,7 @@ i18next.init({
['v2_2_0']: en2_2API,
['v2_3_0']: en2_3API,
['v2_4_0']: en2_4API,
['v2_5_0']: en2_5API,
components: enComponents,
},
[SupportLanguage.zh]: {
Expand All @@ -59,20 +64,21 @@ i18next.init({
['v2_2_0']: zh2_2API,
['v2_3_0']: zh2_3API,
['v2_4_0']: zh2_4API,
['v2_5_0']: zh2_5API,
components: zhComponents,
},
},
lng: SupportLanguage.zh,
updateMissing: true,
fallbackLng: [SupportLanguage.en, SupportLanguage.zh],
fallbackNS: ['v1_8_0','v1_9_0','v1_10_0', 'v2_0_0', 'v2_1_0','v2_2_0', 'v2_3_0', 'v2_4_0'],
fallbackNS: ['v1_8_0','v1_9_0','v1_10_0', 'v2_0_0', 'v2_1_0','v2_2_0', 'v2_3_0', 'v2_4_0','v2_5_0'],
interpolation: {
prefix: "{",
suffix: "}",
escapeValue: false,
},
keySeparator: false,
ns: ['v1_8_0', 'v1_9_0', 'v1_10_0','v2_0_0', 'v2_1_0', 'v2_2_0', 'v2_3_0', 'v2_4_0','components'],
ns: ['v1_8_0', 'v1_9_0', 'v1_10_0','v2_0_0', 'v2_1_0', 'v2_2_0', 'v2_3_0', 'v2_4_0', 'v2_5_0','components'],
nsSeparator: ".",
load: "currentOnly",
react: {
Expand Down
1 change: 1 addition & 0 deletions cloudtower-api-doc/swagger/locales/en/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"ResponseErrorReason_5": " - Misconfigured security definition",
"ResponseErrorReason_6": " - Make sure you visit the page before if it's https protocols",
"Other": "Others",
"CloudTowerApplicationManagement": "CloudTower Application Management",
"Status": "Status: ",
"Time": "Time: ",
"Size": "Size: ",
Expand Down
Loading

1 comment on commit 2e368fc

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for cloudtower-api-doc ready!

✅ Preview
https://cloudtower-api-otngqg1u1-xiaojun.vercel.app

Built with commit 2e368fc.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.