-
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
35 changed files
with
1,455 additions
and
70 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
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
109 changes: 109 additions & 0 deletions
109
...v2-rest/src/main/java/io/gravitee/rest/api/management/v2/rest/model/NativeApiCRDSpec.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,109 @@ | ||
/* | ||
* 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.DefinitionContext; | ||
import io.gravitee.definition.model.DefinitionVersion; | ||
import io.gravitee.definition.model.ResponseTemplate; | ||
import io.gravitee.definition.model.v4.flow.execution.FlowExecution; | ||
import io.gravitee.definition.model.v4.service.ApiServices; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import java.util.*; | ||
import lombok.Data; | ||
|
||
/** | ||
* @author Antoine CORDIER (antoine.cordier at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
@Data | ||
public class NativeApiCRDSpec { | ||
|
||
@NotNull | ||
@NotEmpty | ||
private String id; | ||
|
||
@NotNull | ||
@NotEmpty | ||
private String crossId; | ||
|
||
@NotNull | ||
@Valid | ||
private DefinitionContext definitionContext; | ||
|
||
@NotEmpty | ||
private String name; | ||
|
||
@NotEmpty | ||
private String version; | ||
|
||
@NotNull | ||
private ApiType type; | ||
|
||
private String description; | ||
|
||
private Set<String> tags = new HashSet<>(); | ||
|
||
private List<@Valid Listener> listeners; | ||
|
||
@NotNull | ||
@Size(min = 1) | ||
private List<@Valid EndpointGroupV4> endpointGroups; | ||
|
||
private Analytics analytics; | ||
|
||
private List<@Valid Property> properties = new ArrayList<>(); | ||
|
||
private List<@Valid Resource> resources = new ArrayList<>(); | ||
|
||
private Map<String, @Valid NativePlanCRD> plans = new HashMap<>(); | ||
|
||
private FlowExecution flowExecution; | ||
|
||
private List<FlowV4> flows; | ||
|
||
private Map<String, Map<String, ResponseTemplate>> responseTemplates = new LinkedHashMap<>(); | ||
|
||
private ApiServices services; | ||
|
||
private Set<String> groups; | ||
|
||
private Visibility visibility; | ||
|
||
private GenericApi.StateEnum state; | ||
|
||
private PrimaryOwner primaryOwner; | ||
|
||
private List<String> labels = new ArrayList<>(); | ||
|
||
private List<Metadata> metadata = new ArrayList<>(); | ||
|
||
private ApiLifecycleState lifecycleState; | ||
|
||
private Set<String> categories; | ||
|
||
private Set<MemberCRD> members; | ||
|
||
private boolean notifyMembers; | ||
|
||
private Map<String, PageCRD> pages; | ||
|
||
public DefinitionVersion getDefinitionVersion() { | ||
return DefinitionVersion.V4; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
...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,72 @@ | ||
/* | ||
* 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.DefinitionVersion; | ||
import io.gravitee.definition.model.v4.nativeapi.NativeFlow; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
public class NativePlanCRD { | ||
|
||
@NotNull | ||
@NotEmpty | ||
private String id; | ||
|
||
private String crossId; | ||
|
||
private String name; | ||
|
||
private String description; | ||
|
||
private DefinitionVersion definitionVersion; | ||
|
||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,9 @@ public enum PlanType { | |
* A plan for a bunch of APIs. | ||
*/ | ||
CATALOG, | ||
|
||
/** | ||
* A plan for a bunch of APIs. | ||
*/ | ||
NATIVE, | ||
} |
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.