The aim of this project is to provide a convenient Go client to interact with NiFi components (NiFi Api and NiFi Registry API)
To generate the swagger files for a specific <version>, run the following commands:
git checkout tags/rel/nifi-<version> -b rel/nifi-<version>
Build the swagger.json
for NiFi:
cd nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api
mvn clean install -T2C -DskipTests
Now available at nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/nifi-web-api-2.0.0/docs/rest-api/swagger.json
.
Build the swagger.json
for NiFi Registry:
cd nifi-registry/nifi-registry-core/nifi-registry-web-api
mvn clean install -T2C -DskipTests
Now available at nifi-registry/nifi-registry-core/nifi-registry-web-api/target/nifi-registry-web-api-2.0.0/docs/rest-api/swagger.json
.
To generate the clients please run following command:
./regenerate.sh
Manual changes:
-
In
model_version_control_information_dto
, replace:// The version of the flow Version string `json:"version,omitempty"`
by:
// The version of the flow Version interface{} `json:"version,omitempty"`
-
In
model_revision_dto.go
, replace:Version int64 `json:"version,omitempty"`
by:
Version *int64 `json:"version,omitempty"`
-
In
model_label_dto.go
, replace:// The text that appears in the label. Label string `json:"label,omitempty"`
by:
// The text that appears in the label. Label string `json:"label"`
-
In
LabelDto.md
, replace:**Label** | **string** | The text that appears in the label. | [optional] [default to null]
by:
**Label** | **string** | The text that appears in the label. | [required] [default to null]
-
In
model_parameter_dto.go
, replace:// The description of the Parameter Description string `json:"description,omitempty"` // The value of the Parameter Value string `json:"value,omitempty"`
by:
// The description of the Parameter Description *string `json:"description,omitempty"` // The value of the Parameter Value *string `json:"value"`
-
In
ParameterDto.md
, replace:**Value** | **string** | The value of the Parameter | [optional] [default to null]
by:
**Value** | **string** | The value of the Parameter | [required] [default to null]
-
In
model_parameter_context_dto
, replace:// The Parameters for the Parameter Context Parameters []ParameterEntity `json:"parameters,omitempty"` // The Process Groups that are bound to this Parameter Context BoundProcessGroups []ProcessGroupEntity `json:"boundProcessGroups,omitempty"` // A list of references of Parameter Contexts from which this one inherits parameters InheritedParameterContexts []ParameterContextReferenceEntity `json:"inheritedParameterContexts,omitempty"`
by:
// The Parameters for the Parameter Context Parameters []ParameterEntity `json:"parameters"` // The Process Groups that are bound to this Parameter Context BoundProcessGroups []ProcessGroupEntity `json:"boundProcessGroups"` // A list of references of Parameter Contexts from which this one inherits parameters InheritedParameterContexts []ParameterContextReferenceEntity `json:"inheritedParameterContexts"`
-
In
ParameterContextDto
, replace:**Parameters** | [**[]ParameterEntity**](ParameterEntity.md) | The Parameters for the Parameter Context | [optional] [default to null] **BoundProcessGroups** | [**[]ProcessGroupEntity**](ProcessGroupEntity.md) | The Process Groups that are bound to this Parameter Context | [optional] [default to null] **InheritedParameterContexts** | [**[]ParameterContextReferenceEntity**](ParameterContextReferenceEntity.md) | A list of references of Parameter Contexts from which this one inherits parameters | [optional] [default to null]
by:
**Parameters** | [**[]ParameterEntity**](ParameterEntity.md) | The Parameters for the Parameter Context | [required] [default to null] **BoundProcessGroups** | [**[]ProcessGroupEntity**](ProcessGroupEntity.md) | The Process Groups that are bound to this Parameter Context | [required] [default to null] **InheritedParameterContexts** | [**[]ParameterContextReferenceEntity**](ParameterContextReferenceEntity.md) | A list of references of Parameter Contexts from which this one inherits parameters | [required] [default to null]
-
In
model_position_dto
, replace:// The x coordinate. X float64 `json:"x,omitempty"` // The y coordinate. Y float64 `json:"y,omitempty"`
by:
// The x coordinate. X float64 `json:"x"` // The y coordinate. Y float64 `json:"y"`
-
In
PositionDto
, replace:**X** | **float64** | The x coordinate. | [optional] [default to null] **Y** | **float64** | The y coordinate. | [optional] [default to null]
by:
**X** | **float64** | The x coordinate. | [required] [default to null] **Y** | **float64** | The y coordinate. | [required] [default to null]
-
replace
// The timestamp of when the request was submitted SubmissionTime Time.time `json:"submissionTime,omitempty"` // The timestamp of when the request was last updated LastUpdated Time.time `json:"lastUpdated,omitempty"`
by:
// The timestamp of when the request was submitted SubmissionTime string `json:"submissionTime,omitempty"` // The timestamp of when the request was last updated LastUpdated string `json:"lastUpdated,omitempty"`
-
replace
// The index of the bend point where to place the connection label. LabelIndex int32 `json:"labelIndex,omitempty"`
by:
// The index of the bend point where to place the connection label. LabelIndex int32 `json:"labelIndex"`
This client is:
- inspired by the python client nipyapi
- using swagger-codegen