Browse Source

Fix the API docs.

pull/499/head
Sebastian 6 years ago
parent
commit
7d8a603cf6
  1. 4
      backend/src/Squidex/Areas/Api/Controllers/Apps/AppPatternsController.cs
  2. 2
      backend/src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs
  3. 2
      backend/src/Squidex/Areas/Api/Controllers/History/HistoryController.cs
  4. 2
      backend/src/Squidex/Areas/Api/Controllers/Ping/PingController.cs
  5. 4
      backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs
  6. 16
      backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs
  7. 19
      backend/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml

4
backend/src/Squidex/Areas/Api/Controllers/Apps/AppPatternsController.cs

@ -82,7 +82,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
} }
/// <summary> /// <summary>
/// Update an existing app pattern. /// Update an app pattern.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="id">The id of the pattern to be updated.</param> /// <param name="id">The id of the pattern to be updated.</param>
@ -107,7 +107,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
} }
/// <summary> /// <summary>
/// Delete an existing app pattern. /// Delete an app pattern.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="id">The id of the pattern to be deleted.</param> /// <param name="id">The id of the pattern to be deleted.</param>

2
backend/src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs

@ -107,7 +107,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
} }
/// <summary> /// <summary>
/// Update an existing app role. /// Update an app role.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the role to be updated.</param> /// <param name="name">The name of the role to be updated.</param>

2
backend/src/Squidex/Areas/Api/Controllers/History/HistoryController.cs

@ -31,7 +31,7 @@ namespace Squidex.Areas.Api.Controllers.History
} }
/// <summary> /// <summary>
/// Get the events from the history. /// Get historical events.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="channel">The name of the channel.</param> /// <param name="channel">The name of the channel.</param>

2
backend/src/Squidex/Areas/Api/Controllers/Ping/PingController.cs

@ -27,7 +27,7 @@ namespace Squidex.Areas.Api.Controllers.Ping
} }
/// <summary> /// <summary>
/// Get general info status of the API. /// Get API information.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// 200 => Infos returned. /// 200 => Infos returned.

4
backend/src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs

@ -46,7 +46,7 @@ namespace Squidex.Areas.Api.Controllers.Rules
} }
/// <summary> /// <summary>
/// Get the supported rule actions. /// Get supported rule actions.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// 200 => Rule actions returned. /// 200 => Rule actions returned.
@ -291,7 +291,7 @@ namespace Squidex.Areas.Api.Controllers.Rules
} }
/// <summary> /// <summary>
/// Cancels the event and retries. /// Cancels an event.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="id">The event to enqueue.</param> /// <param name="id">The event to enqueue.</param>

16
backend/src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs

@ -54,7 +54,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Add a nested schema field. /// Add a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -183,7 +183,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Update a nested schema field. /// Update a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -237,7 +237,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Lock a nested schema field. /// Lock a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -292,7 +292,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Hide a nested schema field. /// Hide a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -347,7 +347,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Show a nested schema field. /// Show a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -402,7 +402,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Enable a nested schema field. /// Enable a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -457,7 +457,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Disable nested a schema field. /// Disable a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>
@ -510,7 +510,7 @@ namespace Squidex.Areas.Api.Controllers.Schemas
} }
/// <summary> /// <summary>
/// Delete a nested schema field. /// Delete a nested field.
/// </summary> /// </summary>
/// <param name="app">The name of the app.</param> /// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param> /// <param name="name">The name of the schema.</param>

19
backend/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml

@ -14,12 +14,26 @@
<style> <style>
body { margin: 0; padding: 0; } body { margin: 0; padding: 0; }
.menu-content {
position: fixed !important;
}
.api-content {
margin-left: 260px;
}
@@media print, screen and (max-width: 50rem) {
.api-content {
margin-left: 0;
}
}
</style> </style>
</head> </head>
<body> <body>
<div id="redoc-container"></div> <div id="redoc-container"></div>
<script src="https://cdn.jsdelivr.net/npm/redoc@2.0.0-rc.22/bundles/redoc.standalone.js"></script> <script src="https://cdn.jsdelivr.net/npm/redoc@2.0.0-rc.23/bundles/redoc.standalone.js"></script>
<script> <script>
Redoc.init('@Url.Content(Model.Specification)', { Redoc.init('@Url.Content(Model.Specification)', {
theme: { theme: {
@ -28,7 +42,8 @@
main: '#3f83df' main: '#3f83df'
} }
} }
} },
nativeScrollbars: true
}, document.getElementById('redoc-container')) }, document.getElementById('redoc-container'))
</script> </script>
</body> </body>

Loading…
Cancel
Save