Skip to content

Commit 7d7348f

Browse files
authored
✨ Copy over static files when generating a new file (#81)
<!-- Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved. SPDX-License-Identifier: Proprietary --> ### Description This changes makes copying over static files part of the generation, since the generator will be used with all Clients when the `update-client` workflow runs, we need to make sure that these extensions will at least build without issues. even if they do not use these extensions. Added a function `GetNextP` in `extension_model_hal_link_data.go.static` to make `HalCollectionLinks` compatible with Artefacts Utils <!-- Please put an `x` in the correct box e.g. `[x]` to indicate the testing coverage of this change. --> - [ ] This change is covered by existing or additional automated tests. - [ ] Manual testing has been performed (and evidence provided) as automated testing was not feasible. - [ ] Additional tests are not required for this change (e.g. documentation update). --------- Co-authored-by: aorabdel <[email protected]>
1 parent 6544206 commit 7d7348f

12 files changed

+60
-6275
lines changed

changes/20250404160050.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated client due to schema changes

changes/20250404164922.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:sparkles: Copy over static files when generating a new file

client/extension_model_hal_link_data.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,14 @@ func NewHalLinkDataIterator(elements []HalLinkData) (IIterator, error) {
5252
currentIndex: 0,
5353
}, nil
5454
}
55+
56+
// *************************************************************************************
57+
// Definitions for making types compatible with Client Utils
58+
// *************************************************************************************
59+
// GetNext returns the Next field value if set, zero value otherwise.
60+
func (o *HalCollectionLinks) GetNextP() *HalLinkData {
61+
if o == nil || IsNil(o.Next) {
62+
return nil
63+
}
64+
return o.Next
65+
}

0 commit comments

Comments
 (0)