Skip to content

Commit

Permalink
Set API enum as ref
Browse files Browse the repository at this point in the history
- This will allow common reference to enum in the open api spec.
  • Loading branch information
ianwallen committed Jan 4, 2024
1 parent b892b26 commit 4c3d35d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.fao.geonet.api.records.model.related;


import io.swagger.v3.oas.annotations.media.Schema;

@Schema(enumAsRef = true)
public enum RelatedItemType {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import java.util.List;
import java.util.Map;

import io.swagger.v3.oas.annotations.media.Schema;

/**
* Defines a publication configuration.
*
Expand All @@ -45,9 +47,11 @@ public class PublicationOption {
private ReservedGroup publicationGroup;

// List of operations to activate in the group to publish/unpublish.
List<ReservedOperation> publicationOperations;
@Schema(enumAsRef = true)
private List<ReservedOperation> publicationOperations;

// Additional group(s)/operations(s) to publish/unpublish when the publication is selected.
@Schema(enumAsRef = true)
private EnumMap<ReservedGroup, List<ReservedOperation>> additionalPublications = new EnumMap<>(ReservedGroup.class);

PublicationOption(String name, ReservedGroup publicationGroup, List<ReservedOperation> publicationOperations) {
Expand Down

0 comments on commit 4c3d35d

Please sign in to comment.