|
1 | 1 | package com.apiflows.model; |
2 | 2 |
|
3 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; |
| 4 | +import io.swagger.v3.oas.models.media.Schema; |
4 | 5 |
|
| 6 | +import java.util.HashMap; |
5 | 7 | import java.util.Map; |
6 | 8 |
|
7 | 9 | public class Components { |
8 | 10 |
|
9 | | - private Map<String, InputComponent> inputs; |
10 | | - private Map<String, ParameterComponent> parameters; |
| 11 | + private Map<String, Schema> inputs = new HashMap<>(); |
| 12 | + private Map<String, Parameter> parameters = new HashMap<>(); |
11 | 13 |
|
12 | 14 | // Getters and setters |
13 | 15 |
|
14 | 16 | @JsonProperty("inputs") |
15 | | - public Map<String, InputComponent> getInputs() { |
| 17 | + public Map<String, Schema> getInputs() { |
16 | 18 | return inputs; |
17 | 19 | } |
18 | 20 |
|
19 | | - public void setInputs(Map<String, InputComponent> inputs) { |
| 21 | + public void setInputs(Map<String, Schema> inputs) { |
20 | 22 | this.inputs = inputs; |
21 | 23 | } |
22 | 24 |
|
23 | 25 | @JsonProperty("parameters") |
24 | | - public Map<String, ParameterComponent> getParameters() { |
| 26 | + public Map<String, Parameter> getParameters() { |
25 | 27 | return parameters; |
26 | 28 | } |
27 | 29 |
|
28 | | - public void setParameters(Map<String, ParameterComponent> parameters) { |
| 30 | + public void setParameters(Map<String, Parameter> parameters) { |
29 | 31 | this.parameters = parameters; |
30 | 32 | } |
| 33 | + |
| 34 | + public void addParameter(String key, Parameter parameter) { |
| 35 | + this.parameters.put(key, parameter); |
| 36 | + } |
| 37 | + |
| 38 | + public void addInput(String key, Schema input) { |
| 39 | + this.inputs.put(key, input); |
| 40 | + } |
| 41 | + |
31 | 42 | } |
32 | 43 |
|
0 commit comments