Skip to content

Commit

Permalink
Merge pull request #2528 from kuzzleio/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauNeko authored Apr 2, 2024
2 parents 7ba9e6e + 5a24bbb commit 2008772
Show file tree
Hide file tree
Showing 33 changed files with 331 additions and 1,077 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [2.29.1-beta.2](https://github.com/kuzzleio/kuzzle/compare/v2.29.1-beta.1...v2.29.1-beta.2) (2024-03-22)


### Bug Fixes

* **global:** fix global types ([b4661b9](https://github.com/kuzzleio/kuzzle/commit/b4661b9e1e2d8c169d93e7a17f030338875faed0))
* **ts:** export Kuzzle class so typedef is generated ([448c235](https://github.com/kuzzleio/kuzzle/commit/448c235ef3db8316f02b00d997a48a7e3a30784c))

## [2.29.1-beta.1](https://github.com/kuzzleio/kuzzle/compare/v2.29.0...v2.29.1-beta.1) (2024-03-13)


### Bug Fixes

* **openapi:** remove dedicated components files as we need to generate it automaticaly ([a3036f6](https://github.com/kuzzleio/kuzzle/commit/a3036f6336c1c6e14eb874acde04976f3de1c1ed))
* **settings:** elasticsearch default setting on imports collection ([228482a](https://github.com/kuzzleio/kuzzle/commit/228482af41b822c0e064286083811c9aca95e532))

# [2.29.0](https://github.com/kuzzleio/kuzzle/compare/v2.28.0...v2.29.0) (2024-02-01)


Expand Down
1 change: 1 addition & 0 deletions docker/scripts/start-kuzzle-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ app.hook.register("custom:event", async (name) => {
let syncedHello = "World";
let dynamicPipeId;

app.openApi.definition.components = {}
app.openApi.definition.components.LogisticObjects = {
Item: {
type: "object",
Expand Down
2 changes: 0 additions & 2 deletions features/ServerController.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ Feature: Server Controller
When I successfully execute the action "server":"openapi"
Then I should receive a response matching:
| swagger | "2.0" |
| components.RequestPayload | "_OBJECT_" |
| paths./users/{_id}/_replace.put.tags[0] | "security" |

@http
Expand All @@ -87,7 +86,6 @@ Feature: Server Controller
| scope | "app" |
Then I should receive a response matching:
| paths./openapi-test/{company}/{objectType}/{_id}.post.tags[0] | "openapi-test" |
| components.LogisticObjects.Item | "_OBJECT_" |

# server:publicApi ========================================================================
@development @http
Expand Down
29 changes: 0 additions & 29 deletions lib/api/httpRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@

"use strict";

const {
OpenApiDocumentCount,
OpenApiDocumentDeleteByQuery,
OpenApiDocumentDelete,
OpenApiDocumentScroll,
OpenApiDocumentExists,
OpenApiDocumentUpdate,
OpenApiDocumentReplace,
OpenApiDocumentGet,
OpenApiDocumentCreate,
OpenApiDocumentCreateOrReplace,
OpenApiDocumentValidate,
OpenApiSecurityUpsertUser,
OpenApiDocumentmCreateOrReplace,
} = require("./openapi/components");

const routes = [
// GET (idempotent)
{ verb: "get", path: "/_me", controller: "auth", action: "getCurrentUser" },
Expand Down Expand Up @@ -242,7 +226,6 @@ const routes = [
path: "/:index/:collection/:_id",
controller: "document",
action: "get",
openapi: OpenApiDocumentGet,
},
{
verb: "get",
Expand All @@ -255,7 +238,6 @@ const routes = [
path: "/:index/:collection/:_id/_exists",
controller: "document",
action: "exists",
openapi: OpenApiDocumentExists,
},
{
verb: "post",
Expand All @@ -268,7 +250,6 @@ const routes = [
path: "/_scroll/:scrollId",
controller: "document",
action: "scroll",
openapi: OpenApiDocumentScroll,
},

{
Expand Down Expand Up @@ -770,14 +751,12 @@ const routes = [
path: "/:index/:collection/_count",
controller: "document",
action: "count",
openapi: OpenApiDocumentCount,
},
{
verb: "post",
path: "/:index/:collection/_create",
controller: "document",
action: "create",
openapi: OpenApiDocumentCreate,
},
{
verb: "post",
Expand Down Expand Up @@ -832,7 +811,6 @@ const routes = [
path: "/:index/:collection/_validate",
controller: "document",
action: "validate",
openapi: OpenApiDocumentValidate,
},

{
Expand Down Expand Up @@ -955,7 +933,6 @@ const routes = [
path: "/users/:_id/_upsert",
controller: "security",
action: "upsertUser",
openapi: OpenApiSecurityUpsertUser,
},
{
verb: "post",
Expand Down Expand Up @@ -1241,7 +1218,6 @@ const routes = [
path: "/:index/:collection/:_id",
controller: "document",
action: "delete",
openapi: OpenApiDocumentDelete,
},
{
verb: "delete",
Expand All @@ -1254,7 +1230,6 @@ const routes = [
path: "/:index/:collection/_query",
controller: "document",
action: "deleteByQuery",
openapi: OpenApiDocumentDeleteByQuery,
},
{
verb: "delete",
Expand Down Expand Up @@ -1421,21 +1396,18 @@ const routes = [
path: "/:index/:collection/:_id",
controller: "document",
action: "createOrReplace",
openapi: OpenApiDocumentCreateOrReplace,
},
{
verb: "put",
path: "/:index/:collection/_mCreateOrReplace",
controller: "document",
action: "mCreateOrReplace",
openapi: OpenApiDocumentmCreateOrReplace,
},
{
verb: "put",
path: "/:index/:collection/:_id/_replace",
controller: "document",
action: "replace",
openapi: OpenApiDocumentReplace,
},
{
verb: "put",
Expand All @@ -1458,7 +1430,6 @@ const routes = [
path: "/:index/:collection/:_id/_update",
controller: "document",
action: "update",
openapi: OpenApiDocumentUpdate,
deprecated: {
since: "2.11.0",
message: 'Use "document:update" route with PATCH instead of PUT',
Expand Down
48 changes: 0 additions & 48 deletions lib/api/openapi/OpenApiManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@
* limitations under the License.
*/

import {
OpenApiPayloadsDefinitions,
OpenApiDocumentCountComponent,
OpenApiDocumentDeleteByQueryComponent,
OpenApiDocumentDeleteComponent,
OpenApiDocumentScrollComponent,
OpenApiDocumentExistsComponent,
OpenApiDocumentUpdateComponent,
OpenApiDocumentReplaceComponent,
OpenApiDocumentGetComponent,
OpenApiDocumentCreateOrReplaceComponent,
OpenApiDocumentCreateComponent,
OpenApiDocumentValidateComponent,
OpenApiSecurityUpsertUserComponent,
OpenApiDocumentmCreateOrReplaceComponent,
} from "./components";
import { OpenApiDefinition } from "../../types/OpenApiDefinition";
import { version } from "../../../package.json";
import { generateOpenApi } from "./openApiGenerator";
Expand All @@ -50,7 +34,6 @@ export class OpenApiManager {
name: "Kuzzle team",
url: "https://kuzzle.io",
email: "[email protected]",
discord: "http://join.discord.kuzzle.io",
},
license: {
name: "Apache 2",
Expand All @@ -62,40 +45,9 @@ export class OpenApiManager {
description: "Kuzzle API Documentation",
url: "https://docs.kuzzle.io/core/2/api/",
},
servers: [
{
url: "https://{baseUrl}:{port}",
description: "Kuzzle Base Url",
variables: {
baseUrl: { default: "localhost" },
port: { default: 7512 },
},
},
],
tags: [],
schemes: ["https", "http"],
paths: {},
components: {
...OpenApiPayloadsDefinitions,

document: {
...OpenApiDocumentCountComponent,
...OpenApiDocumentDeleteByQueryComponent,
...OpenApiDocumentDeleteComponent,
...OpenApiDocumentScrollComponent,
...OpenApiDocumentExistsComponent,
...OpenApiDocumentUpdateComponent,
...OpenApiDocumentReplaceComponent,
...OpenApiDocumentGetComponent,
...OpenApiDocumentCreateOrReplaceComponent,
...OpenApiDocumentCreateComponent,
...OpenApiDocumentValidateComponent,
},
security: {
...OpenApiSecurityUpsertUserComponent,
...OpenApiDocumentmCreateOrReplaceComponent,
},
},
};
/* eslint-enable sort-keys */

Expand Down
47 changes: 0 additions & 47 deletions lib/api/openapi/components/document/count.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions lib/api/openapi/components/document/create.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions lib/api/openapi/components/document/createOrReplace.yaml

This file was deleted.

Loading

0 comments on commit 2008772

Please sign in to comment.