diff --git a/generators/src/main/java/com/algolia/codegen/cts/tests/ParametersWithDataType.java b/generators/src/main/java/com/algolia/codegen/cts/tests/ParametersWithDataType.java index 33954c419d3..a70abf23aae 100644 --- a/generators/src/main/java/com/algolia/codegen/cts/tests/ParametersWithDataType.java +++ b/generators/src/main/java/com/algolia/codegen/cts/tests/ParametersWithDataType.java @@ -478,7 +478,8 @@ private void handleMap(String paramName, Object param, Map testO } private void handlePrimitive(Object param, Map testOutput, IJsonSchemaValidationProperties spec) throws CTSException { - if (spec != null && spec.getIsPrimitiveType()) { + // some int64 are not considered primitive, thanks a lot openapi + if (spec != null && (spec.getIsPrimitiveType() || spec.getIsLong())) { transferPrimitiveData(spec, testOutput); } else { inferDataType(param, null, testOutput); diff --git a/specs/common/schemas/Rule.yml b/specs/common/schemas/Rule.yml index b395f4393f4..0bd90d27a0c 100644 --- a/specs/common/schemas/Rule.yml +++ b/specs/common/schemas/Rule.yml @@ -13,9 +13,11 @@ timeRange: properties: from: type: integer + format: int64 description: When the rule should start to be active, in Unix epoch time. until: type: integer + format: int64 description: When the rule should stop to be active, in Unix epoch time. required: - from diff --git a/specs/recommend/common/responses/common.yml b/specs/recommend/common/responses/common.yml index 35d4d3ce599..f706bab2549 100644 --- a/specs/recommend/common/responses/common.yml +++ b/specs/recommend/common/responses/common.yml @@ -1,17 +1,3 @@ -taskID: - type: integer - format: int64 - example: 1514562690001 - description: | - Unique identifier of a task. - - A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. - -updatedAt: - type: string - example: 2023-07-04T12:49:15Z - description: Date and time when the object was updated, in RFC 3339 format. - recommendUpdatedAtResponse: type: object description: Response, taskID, and update timestamp. @@ -21,6 +7,6 @@ recommendUpdatedAtResponse: - updatedAt properties: taskID: - $ref: '#/taskID' + $ref: '../../../common/responses/common.yml#/taskID' updatedAt: - $ref: '#/updatedAt' + $ref: '../../../common/responses/common.yml#/updatedAt' diff --git a/specs/recommend/common/schemas/RecommendRule.yml b/specs/recommend/common/schemas/RecommendRule.yml index 7d725031d99..1de846c817b 100644 --- a/specs/recommend/common/schemas/RecommendRule.yml +++ b/specs/recommend/common/schemas/RecommendRule.yml @@ -9,7 +9,7 @@ RecommendRule: description: Rule metadata. properties: lastUpdate: - $ref: '../responses/common.yml#/updatedAt' + $ref: '../../../common/responses/common.yml#/updatedAt' objectID: $ref: '../../../common/parameters.yml#/ruleID' condition: diff --git a/specs/search/paths/rules/common/schemas.yml b/specs/search/paths/rules/common/schemas.yml index 88d2229398a..1bada84b2b2 100644 --- a/specs/search/paths/rules/common/schemas.yml +++ b/specs/search/paths/rules/common/schemas.yml @@ -30,7 +30,7 @@ rule: type: array description: Time periods when the rule is active. items: - $ref: '#/timeRange' + $ref: '../../../../common/schemas/Rule.yml#/timeRange' required: - objectID @@ -289,20 +289,6 @@ automaticFacetFilter: required: - facet -timeRange: - type: object - additionalProperties: false - properties: - from: - type: integer - description: When the rule should start to be active, in Unix epoch time. - until: - type: integer - description: When the rule should stop to be active, in Unix epoch time. - required: - - from - - until - updatedRuleResponse: type: object additionalProperties: false