-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
402 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...nt-v2-rest/src/main/java/io/gravitee/rest/api/management/v2/rest/model/NativePlanCRD.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright © 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.gravitee.rest.api.management.v2.rest.model; | ||
|
||
import io.gravitee.definition.model.v4.nativeapi.NativeFlow; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import java.util.List; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
public class NativePlanCRD { | ||
|
||
@NotNull | ||
@NotEmpty | ||
private String id; | ||
|
||
private String crossId; | ||
|
||
private String name; | ||
|
||
private String description; | ||
|
||
private PlanSecurity security; | ||
|
||
private List<String> characteristics; | ||
|
||
private List<String> excludedGroups; | ||
|
||
private String generalConditions; | ||
|
||
private int order; | ||
|
||
private String selectionRule; | ||
|
||
@NotNull | ||
private PlanStatus status; | ||
|
||
private List<String> tags; | ||
|
||
@NotNull | ||
private PlanType type; | ||
|
||
private PlanValidation validation; | ||
|
||
private List<NativeFlow> flows; | ||
|
||
@NotNull | ||
private PlanMode mode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
...pi-model/src/main/java/io/gravitee/rest/api/model/v4/nativeapi/UpdateNativeApiEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
/* | ||
* Copyright © 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.gravitee.rest.api.model.v4.nativeapi; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import io.gravitee.common.component.Lifecycle; | ||
import io.gravitee.definition.model.DefinitionVersion; | ||
import io.gravitee.definition.model.v4.ApiType; | ||
import io.gravitee.definition.model.v4.nativeapi.NativeApiServices; | ||
import io.gravitee.definition.model.v4.nativeapi.NativeEndpointGroup; | ||
import io.gravitee.definition.model.v4.nativeapi.NativeFlow; | ||
import io.gravitee.definition.model.v4.nativeapi.NativeListener; | ||
import io.gravitee.definition.model.v4.property.Property; | ||
import io.gravitee.definition.model.v4.resource.Resource; | ||
import io.gravitee.rest.api.model.DeploymentRequired; | ||
import io.gravitee.rest.api.model.PrimaryOwnerEntity; | ||
import io.gravitee.rest.api.model.Visibility; | ||
import io.gravitee.rest.api.model.WorkflowState; | ||
import io.gravitee.rest.api.model.api.ApiLifecycleState; | ||
import io.gravitee.rest.api.model.context.OriginContext; | ||
import io.gravitee.rest.api.model.v4.api.GenericApiEntity; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.ArrayList; | ||
import java.util.Date; | ||
import java.util.HashMap; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import lombok.With; | ||
|
||
/** | ||
* @author Guillaume LAMIRAND (guillaume.lamirand at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString | ||
@EqualsAndHashCode | ||
@Schema(name = "UpdateNativeApiEntityV4") | ||
@Builder(toBuilder = true) | ||
@With | ||
public class UpdateNativeApiEntity { | ||
|
||
@Schema(description = "API's uuid.", example = "00f8c9e7-78fc-4907-b8c9-e778fc790750") | ||
private String id; | ||
|
||
@Schema(description = "API's crossId. Identifies API across environments.", example = "df83b2a4-cc3e-3f80-9f0d-c138c106c076") | ||
private String crossId; | ||
|
||
@Schema(description = "API's name. Duplicate names can exists.", example = "My Api") | ||
private String name; | ||
|
||
@Schema(description = "Api's version. It's a simple string only used in the portal.", example = "v1.0") | ||
private String apiVersion; | ||
|
||
@Schema(description = "API's gravitee definition version") | ||
private DefinitionVersion definitionVersion; | ||
|
||
@Schema( | ||
description = "API's description. A short description of your API.", | ||
example = "I can use a hundred characters to describe this API." | ||
) | ||
private String description; | ||
|
||
@Schema(description = "The list of sharding tags associated with this API.", example = "public, private") | ||
@DeploymentRequired | ||
@Builder.Default | ||
private Set<String> tags = new HashSet<>(); | ||
|
||
@Schema(description = "A list of listeners used to describe our you api could be reached.") | ||
@DeploymentRequired | ||
private List<NativeListener> listeners; | ||
|
||
@Schema(description = "A list of endpoint describing the endpoints to contact.") | ||
@DeploymentRequired | ||
private List<NativeEndpointGroup> endpointGroups; | ||
|
||
@Schema(description = "A dictionary (could be dynamic) of properties available in the API context.") | ||
@DeploymentRequired | ||
@Builder.Default | ||
private List<Property> properties = new ArrayList<>(); | ||
|
||
@Schema(description = "The list of API resources used by policies like cache resources or oauth2") | ||
@DeploymentRequired | ||
@Builder.Default | ||
private List<Resource> resources = new ArrayList<>(); | ||
|
||
@Schema(description = "A list of plans to apply on the API") | ||
@DeploymentRequired | ||
@Builder.Default | ||
private Set<NativePlanEntity> plans = new HashSet<>(); | ||
|
||
@Schema(description = "A list of flows containing the policies configuration.") | ||
@DeploymentRequired | ||
private List<NativeFlow> flows; | ||
|
||
@DeploymentRequired | ||
@Schema(description = "The configuration of API services like the dynamic properties.") | ||
private NativeApiServices services; | ||
|
||
@Schema(description = "API's groups. Used to add team in your API.", example = "['MY_GROUP1', 'MY_GROUP2']") | ||
private Set<String> groups; | ||
|
||
@Schema(description = "The visibility of the API regarding the portal.", example = "PUBLIC") | ||
private Visibility visibility; | ||
|
||
@Schema(description = "The user with role PRIMARY_OWNER on this API.") | ||
private PrimaryOwnerEntity primaryOwner; | ||
|
||
@Schema(description = "the API logo encoded in base64") | ||
private String picture; | ||
|
||
@Schema( | ||
description = "the API logo URL.", | ||
example = "https://gravitee.mycompany.com/management/apis/6c530064-0b2c-4004-9300-640b2ce0047b/picture" | ||
) | ||
private String pictureUrl; | ||
|
||
@Schema(description = "the list of categories associated with this API", example = "Product, Customer, Misc") | ||
private Set<String> categories; | ||
|
||
@Schema(description = "the free list of labels associated with this API", example = "json, read_only, awesome") | ||
private List<String> labels; | ||
|
||
/** Context explaining where the API comes from. */ | ||
@Builder.Default | ||
private OriginContext originContext = new OriginContext.Management(); | ||
|
||
@JsonIgnore | ||
@Builder.Default | ||
private Map<String, Object> metadata = new HashMap<>(); | ||
|
||
private ApiLifecycleState lifecycleState; | ||
|
||
private WorkflowState workflowState; | ||
|
||
private boolean disableMembershipNotifications; | ||
|
||
@Schema(description = "the API background encoded in base64") | ||
private String background; | ||
|
||
@Schema( | ||
description = "the API background url.", | ||
example = "https://gravitee.mycompany.com/management/apis/6c530064-0b2c-4004-9300-640b2ce0047b/background" | ||
) | ||
private String backgroundUrl; | ||
|
||
@JsonIgnore | ||
private String referenceType; | ||
|
||
@JsonIgnore | ||
private String referenceId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.