Skip to content

Commit e12eea5

Browse files
committed
Update to schema 573 (#373)
Mark audit log changes_detail field as nullable Add warning field to ApiToken
1 parent f948572 commit e12eea5

4 files changed

Lines changed: 9 additions & 15 deletions

File tree

‎.github/inventree_test_hash.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
da655f2312896e7acf1cf1c6f1c14d2a2ef7c35c
1+
4ba5cfbb674b5f25bdd2e52a60488c186faa8d1e

‎pom.xml‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>com.w3asel</groupId>
88
<artifactId>inventree-sdk-java</artifactId>
99
<packaging>jar</packaging>
10-
<version>1.6.572-SNAPSHOT</version>
10+
<version>1.6.573-SNAPSHOT</version>
1111

1212
<name>InvenTree SDK (Java)</name>
1313
<description>A Java implementation of the OpenAPI spec published by InvenTree.</description>
@@ -170,16 +170,6 @@
170170
<token>^(\s+)- type: string$\n\s+maxLength: 0$\n</token>
171171
<value></value>
172172
</replacement>
173-
<!-- should be non-required fields -->
174-
<replacement>
175-
<token>^\s+- changes_detail$\n</token>
176-
<value></value>
177-
</replacement>
178-
<!-- field missing from schema -->
179-
<replacement>
180-
<token>^(\s+ApiToken:\n.*\n.*\n.*properties:$)(\n\s+)(created:$\n)</token>
181-
<value>$1$2warning:$2 type: string$2 nullable: true$2 readOnly: true$2$3</value>
182-
</replacement>
183173
</replacements>
184174
</configuration>
185175
</plugin>

‎src/main/resources/api.yaml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.3
22
info:
33
title: InvenTree API
4-
version: '572'
4+
version: '573'
55
description: API for InvenTree - the intuitive open source inventory management
66
system
77
license:
@@ -27379,6 +27379,10 @@ components:
2737927379
readOnly: true
2738027380
nullable: true
2738127381
description: As entered by the user or action during revocation
27382+
warning:
27383+
type: string
27384+
readOnly: true
27385+
nullable: true
2738227386
required:
2738327387
- active
2738427388
- created
@@ -27618,6 +27622,7 @@ components:
2761827622
items:
2761927623
$ref: '#/components/schemas/AuditChangeDetail'
2762027624
readOnly: true
27625+
nullable: true
2762127626
title: Change Details
2762227627
cid:
2762327628
type: string
@@ -27640,7 +27645,6 @@ components:
2764027645
- action
2764127646
- action_label
2764227647
- changes
27643-
- changes_detail
2764427648
- model_label
2764527649
- model_type
2764627650
- object_pk

‎src/test/java/com/w3asel/inventree/api/TestAuditApi.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private static void assertAuditLogEntryEquals(JsonObject expected, AuditLogEntry
176176

177177
// TODO implement further when testing a value that populates either of these
178178
assertEquals(0, fields.get("changes_text").getAsString().length(), "Expected empty changes_text");
179-
assertEquals(0, actual.getChangesDetail().size(), "Expected empty changes_detail");
179+
assertNull(actual.getChangesDetail(), "Expected empty changes_detail");
180180

181181
assertNullableFieldEquals(String.class, "cid", fields, actual.getCid());
182182

0 commit comments

Comments
 (0)