Releases: dikhan/terraform-provider-openapi
v0.6.0
What's new?
- added support for configuring provider fields via environment variables
- added support for configuring provider fields via OpenAPI Plugin Configuration file
- added support for arrays of objects
Changelog
c729086 fix broken links
d3807e6 comment out externall configuration so example container does not break
46e51fe quick doc update regarding plugin configuration
c7fa22b update minor version
ece0db7 Merge pull request #77 from dikhan/feature/array-of-objects-support
718cb9b add more explicit error message
0696aaf be explicit about case string
22acdd7 add unit tests for convertPayloadToLocalStateDataValue
7a8437f better description for what is expected
227879b better descriptio nfor what is expected
2e71d56 fix typo
3e9ba36 update use case description
7559902 fix typos comments
26b174f rearrange type int check within the float reflect case
cede465 update floatToString to not use decimals when dealing with zero float values
8232394 update integration tests with object type support
633e301 update example adding object example
e36b5bb [BIG CHANGE] this is the alternative change using TypeMaps as expected
d8b3221 [BIG CHANGE] this change introduces major changes in properties of type typeObject
ff67ab3 update ObjectProperty example to include more fields with different types
d5ec8d4 add unit test for TestGetPropertyPayload
22d1878 beter to return the error handle it as desired outside
51f1a2f add better logging for getPropertyPayload
6cc707e add more unit tests
40ae3af quick code rearrangement
6745e5d fix doc typo and add info about supported aray item definitions
894f5c5 add units tests for:
5d0a25b fix isObjectProperty issue
ac35d3d add units tests for:
f7a249b fix integration tests
a4d584c add support for other use cases in the example cdn
bfb2e5d better logging when finding properties
673bd1f add support for getPropertyPayload and convertPayloadToLocalStateDataValue
3c71b53 create helper method to get property based on its terraform name
c1155ca add a helper method to check if the def property is a list of objects
799c86b add case for array reflection
98b5eff add test coverage for nested and ref external schemas when using array types
5e20733 reuse isObjectProperty method to make sure both nested and ref schemas are supported
92123d5 update main tf config example
554086d update documentation adding info for arrays of objects/primitives
f269a22 add integration tests covering the arrays of objects use casse
5a369e3 autogenerate the swaggercodegen example code
bef1bfc update swaggercodegen example yaml including array of objects property
114b00c ensure type and elems are the right configuration
6d167bc move helper functions to tests
30daa75 update unit tests with array ob objects
c154177 add support for arrays of different types in the specSchemaDefinitionProperty
2335f28 Merge pull request #75 from dikhan/feabure/enable-provider-schema-properties-config-from-external-sources
8f0a809 stop instantiating the providing in the init functions
d284388 add more clear info
fcd07e3 update file location info
09c2031 remove redundant column
24ab55e remove typo
01c8350 add documentation about Schema Configuration Object
6d38e17 add integration tests
f8803d1 add helper createPluginConfigFile function
4dfc850 add support for being able to set plugin config file path from an env varialbe
e4db9be integrate support for properties with default values in the provider schema
e696711 add support for schema property configuration
3c675a2 dep ensure -add github.com/oliveagle/jsonpath
7c6aa51 Merge pull request #74 from dikhan/feature/enable_provider_configuraiton_via_env_variables
36260f3 add documentation about how to configure the openapi provider
820ca9d add integration tests
19e05cc add unit tests
58c0dbf add support for env variables to set provider configuration values
v0.5.1
v0.5.0
What's new?
- Added support for import. Now you can use terraform import to import resources managed by an openapi provider.
Changelog
8933589 pump up minor version
85aecce Merge pull request #71 from dikhan/enhacement/improve-error-output
7e3e992 throw a more user friendly error when terraform config is missing values for headers and sec definitions
d95d16f fix not being rendered due to markup format
eaf3a36 Merge pull request #70 from dikhan/feature/import-support
de9b1b6 add integration test
6259125 add unit test
01bd82d add implementation for import support
v0.4.2
v0.4.1
v0.4.0
Changes
This release includes major refactoring on the code structure. The main change is the interfaces expose now between swagger implementations and the overlying infrastructure:
- OpenAPI provider code does not rely on internal implementation details of the swagger 2.0 lib but rather on interfaces than then different implementation can be provided. This makes the code structure of the provider more flexible allowing different implementations such as OpenAPI 3.0 to be developed and switched when the time comes.
- It also simplifies greatly the unit testing process.
- Integration tests are not in place raising the confidence when new releases are performed as regressions can be captured more easily instead of performing manual tests
Changelog
3675f79 fix issue with getProviderName after adding support for binaries with version
b0ca34c fix install script to introduce version binary support
b9d57b2 remove typo
a2b65d9 Merge pull request #65 from dikhan/feature/add-version-support
1ecb744 commenting out windows support until further testing is performed
a13e218 remove unnecessary {{.Env.USER}}
a1e83c3 set prerelease to true for tessting purposes
d1abd68 remove single quotes
74de60b set up build properly
21f5f23 pump version number
f81e32a update release documentation
ce0125a add defaults for RELEASE_TAG and RELEASE_MESSAGE
7f7e379 update goreleaser to include version in the binary
066f5cc make fields private
3b9f67c remove non needed -a for building locally
aeee22e updated various build settings
0f070f2 add more details to baked in flags
e14e8f3 update install script to use version file
80b1786 bake in version at compile time
a8368a1 Merge pull request #64 from dikhan/feature/add-integration-tests
6f9a336 Merge branch 'master' into feature/add-integration-tests
7db8658 add golang.org/x/lint/golint
c32081d Merge pull request #54 from dikhan/feature/add-integration-tests
7a6e69e add DC_SERVICE to be able to bring up a specific service
f5a1d36 update local env doc
55659a3 clean up root readme and link reference to other docs (installation and usage)
9c93a10 create how to install
3d3b625 create how to use documentation
bf6b068 update goa documentation
55cb9b8 update swaggercodegen documentation
33e4564 be less specific as depending on local setup the error message might be different
514c35c Merge branch 'master' into feature/add-integration-tests
af744ed fix issue with shared properties
665b9a1 add unit tests for provider configuration
c4961a0 add tests for provider
c647352 go fmt
df3a90e add unit tests for backend configuration
535b6b0 add unit tests for sec def schemes
c877e92 add unit tests for sec def
3603a6a add unit tests for sec def apikey
3e14731 remove no longer needed test file
2b957e9 reformatting
4083d97 add unit test for spec header
2a39c90 add unit test for SpecAnalyser
f95b76d add test for openapi_client
b2b93f8 add unit test for openapi client
ef0b80e create specStubBackendConfiguration
ff21fbe use HttpClientIface in ProviderClient to enable easier unit testing
f57b39a dep ensure --update github.com/dikhan/http_goclient
8473c26 add unit tests for api key (header and query)
a807d5d add interface compliant tests
0e23ae6 use -d instead of --detach to fix travis -ci build
865ce24 fix issues with example container
e38d0a0 remove symlinks references
4f24015 use build instead and no cache to avoid weird behaviours
fdfdfce add unit tests for scheam definition and schema definition property
9f3c4ed export SpecSchemaDefinition and add isStatusIdentifier to SchemaDefinitionProperty constructors
68d5e0a update getStatusIdentifier to return statusHierarchy
ad07208 fix int tests
74e6fea add missing unit tests
64d73cb add support for object types
a935b8d fix tests
114a16b move unit test commented out to header v2 file
71dbd68 forklift host override and multi-region functionality
56775c4 enable polling in delete so int test also cover destroy poll coverage properly
60f5ed4 add support to test destroy
a011e66 use right errors import package
275cf80 add int test that covers failures in the API
801fd8f add int test that covers failures in the API
2f8eef2 add support for delete polling
157f108 remove no longer needed comment
352eb4c add support for update async polling
c734c6e add default config to the resourceFactory struct for better unit testing
70c47ea handle 404 properly
99c13a7 check resource destroy after a delay
792e28b make type private
d19de22 add test for operations with empty responses
7bea9cb organising files and struct renames to be consistent with spec prefix
c92ba69 fix int tests
1b8c941 add async functionality to create method
1494d05 prepare test for timeout
db2a6a1 added int test for lbs (async operation)
62e7649 grouped operations under one struct
bd66958 add lb resource to swaggercodegen terraform config example
7787509 forklift x-terraform-resource-timeout from master
1a27443 move r.shouldIgnoreResource() to provider factory
7825529 add int test for zero values
47f7296 forklift x-terraform-resource-name from master
82b1031 add missing unit tests to provider factory
3d67918 add more units test
86b8cfe quick method rename GetAPIBackendConfiguration
d8c62e7 auth files renaming and restructuring
b1e1659 quick refactor on createAPIKeyAuthenticator to accept SpecSecurityDefinition instead
8174ef6 fix compile errors after changing GetAllHeaderParameters signature
060ceb7 add error handling to GetAllHeaderParameters() method
4179df4 use corresponding complaint name for the look up
923965e fix unit test
1aa596a fix issue where actual header names were used in the provider config for security schema def and headers for look ups
bd6ab15 add unit test for CreateProviderConfig
9d636f9 create spec analyser stub for testing purposes
9af29dc add comment to clientOpenAPIStub struct
3725da2 add validation check for getProviderResourceName
41909a6 add missing unit tests for createResourceSchema and createTerraformResource
724c5c9 move resource factory test helper methods to the resource factor unit test file
f88d221 add missing unit tests for createResourceSchema and createTerraformResource
24aa46a fix compile errors
2e385d4 remove un-necessary ifs that were not working when errors occurred
bcc3888 Add unit tests for resource factory
952194f moved specific spec definition property functionality to spec resource file
c2f58ba create openAPIClient interface
5671c21 remove deprecated files
cf9f071 add better logging for registered resources
cbd59ab bring up swaggercodegen-service-provider-api local env by default
c9d1fbd remove no longer needed debug log entry...too much noise
c809b7f moved code to separate files
ae82427 pass pointer of globalSecuritySchemes
32f3032 providerConfiguration uses real names and not converted names in the keys
3247029 use names and not converted names to look up security schemes and headers from auth
8d6835b move SpecSecurity to its own file
27eac4e move spec to its own file
a680bbc move tests from openapi_spec_analyser_test / openapi_v2_spec_analyser_test
1032a4a fix TEST_PACKAGES regex andonly test files under openapi package
08a268f use -d for docker-compose compatibility reasons
d2f3307 fix lint/vet issues
31aac9f run integration tests as part of the ci pipeline
7364fd1 clean up int tests
2610610 add tests for:
2f6d233 add test for immutable property
8f941b2 create make target for integration tests
23cd818 create integration tests
5ddf17d add missing dep files
e2f408c fix various bugs
5d6264e major code refactoring to move away from poc code
191ac8a major refactoring
v0.3.1
Changes
- Added support for object type properties
- removed symlinks support as they don't resolve well in certain platforms causing errors at runtime. This is not a reliable solution and it was just created in the first place to optimize memory space which is not a concern right now considering the size of the provider binary.
Changelog
c497641 update release version
0250626 Merge pull request #63 from dikhan/refactor/remove-symlinks
2a88b13 move LATEST_RELEASE_VERSION to the top so it's easier to spot
d0b7cbb Merge branch 'master' into refactor/remove-symlinks
a8b2482 udpate local env docs
b827be0 add some docs about the make examples-container target
321deb5 removed no longer needed code
e056a5b remove symlink support
41f2ffc add support for domains with custom ports
0023591 Merge pull request #61 from dikhan/feature/object-type-support
101be69 add documentation
ac22a09 add support for object types
82551e2 pass asa.d.Spec().Definitions to resourceInfo.
e194ed1 add helper method GetSchemaDefinition to assist with ref look ups
44ec895 update examples with various forms of object properties
8b7c079 add object_property model
af048bc update example to include object type support
4169a9e Update how_to.md
v0.3.0
Changes
Added support for the following swagger extensions:
- x-terraform-resource-timeout: define resource max operation timeout (applicable to all resource operations - GET/PUT/POST/DELETE)
- x-terraform-resource-poll-enabled: asynchronous resource operations support
- x-terraform-resource-host: override global host value at a resource level
- x-terraform-resource-regions-%s: multi region support for resources that are managed via regional APIs (similar to AWS resources that are managed per region)
- x-terraform-resource-name: define the resource name that should be used in the terraform configuration
Changelog
bdfbdbb pump up feature version
54370ed remove not needed if statement
96d50e6 fix merging compile errors
b544574 make makefile fail on error for fmt, vet, lint and test
b0bd04d Merge pull request #58 from dikhan/feature/override-host-resource-level
5ec0362 Merge branch 'master' into feature/override-host-resource-level
79d7edb Merge pull request #60 from dikhan/feature/x-terraform-resource-name
f6c8cee add test for version higher than 9
d97713e quick fix in pr template
7bed18f update docs including x-terraform-resource-name extension info
9f7837e add support for x-terraform-resource-name extension
050fecd add 'x-terraform-resource-host' and 'x-terraform-resource-regions-%s' docs
03e4fac add x-terraform-resource-host to the example
e81b12b update log output to include overriden host
e86a832 move debug log to error section
fceb4ce add support for x-terraform-resource-host and multiregion resources
bb41346 Merge pull request #56 from dikhan/feature/resource-timout-extension
53865f5 update regex to a more simple one as suggested in the PR
35130ab fix typos
65856d2 update documentation
75aac0d handle special use cases better
669e59d add unit tests
b31f783 add support for x-terraform-resource-timeout extension
f7e6ccc Merge pull request #53 from dikhan/feature/fix-read-when-not-found
7d76c9f fix bug where if extenson was not present the target status validation would fail
b9e426b do not expect x-terraform-resource-poll-completed-statuses for delete operations
742b915 add missing mandatory description field for 202 lb delete response
e33a57d save extra api call by calling updateStateWithPayloadData instead
895cd92 check errors when reading and if error is NotFound then return nil as expected
56c03a3 Merge pull request #50 from dikhan/feature/support-for-async-operations
94a788d better logging in example api server
2f9841d add validation for readonly requirement in status fields (only applicable when performing polling)
5c99f7b rename x-terraform-resource-poll-target-statuses to x-terraform-resource-poll-completed-statuses
dd6bfb0 quick doc update to accentuate the importance of status being read only
de5452f clarify default behaviour if 'x-terraform-resource-poll-enabled' extension is not present
3dcfea8 fixing description of status fields
bba69d5 fix typo
f7f1082 add small comment to enum field
81c541c fix typo
38ef6ea remove not yet supported extensions as it might be confusing for readers
5379793 handle properly 404 not founds when resource is destroyed
3178b6a comment out extension not yet implemented
f9f49c0 add support for delete async operations
2dd4d51 add support for update async operations
02e8df6 pass in specific operation timeout value
0f08ecf refactor lb api async logic to reuse code
0be9bed add support for async create operations
8fec507 add support for x-terraform-resource-poll-pending-statuses
fa9ab13 add support for x-terraform-resource-poll-target-status
f4aa43d add support for x-terraform-resource-poll-enabled extension
5a299f7 adding some comments to terraform config file for reference purposes
91711cf update lb example resource to behave as an async resource
db43dcc add default timeout (will be applicable to all CRUD operations)
8ce75d8 add backend for lbs
7aa6ba7 update documentation adding info about x-terraform-field-status
d17cda4 add support for x-terraform-field-status extension
bdf8a8c Merge branch 'master' into feature/support-for-async-operations
a12d0a8 update issue links
8bff299 Merge branch 'master' into feature/support-for-async-operations
778619a Delete Feature_request.md
60f5c9f Delete Bug_report.md
8b14acf Update issue templates
51a3cb6 leverage Issue template improvements
e50f46d update analyser to not throw an error when running into non compliant resources
ac2fb5e update swagger example including extensions to support async operations
295fb59 fix OpenAPI plugin configuration file example
03d1765 fix example yaml
acf2d3f Merge branch 'master' into feature/support-for-async-operations
154d402 Merge branch 'master' into feature/support-for-async-operations
699c49c Merge branch 'master' into feature/support-for-async-operations
71847a3 add new resource example that has async operations
v0.2.0
Summary of changes
Fixes a bug introduced by the x-terraform-field-name extension feature where there was a miss-match between the resource schema configuration and the read/write operations performed against the state file. This caused terraform to fail on apply operations not being able to find the property value set in the terraform configuration file due to the code trying to find the swagger property name and not the value used in the swagger property x-terraform-field-name extension
Changelog
4c9fc5c update version in install script
c39756a do not remove state files when running the example
c392f34 use always terraform compliant names when reading from/writing into the state
v0.1.8
Summary of changes
- Added support for support for x-terraform-field-name which enables service providers to override property names with different names.
- Automatic conversion of openapi field names to terraform compliant names. This applies to:
securityDefinition names
securityDefinitions:
apikeyAuth: # this is not terraform name compliant; hence it will be converted to apikey_auth. This will be the name used in the terraform provider config file.
type: "apiKey"
name: "Authorization"
in: "header"
Corresponding terraform configuration view:
provider "swaggercodegen" {
apikey_auth = "${var.apikey_auth}"
}
header param names
paths:
/v1/cdns:
post:
parameters:
- in: "header"
name: "X-Request-ID" # this is not a terraform compliant name; hence it will be converted to x_request_id. This will be the name used in the terraform provider config file.
type: "string"
required: true
Corresponding terraform configuration view:
provider "swaggercodegen" {
x_request_id = "request header value for POST /v1/cdns"
}
definition property names
definitions:
ContentDeliveryNetworkV1:
exampleInt: # this name is not terraform name compliant; the provider will do a translation on the fly to make it terraform name compliant - the result will be example_int
type: integer
exampleNumber:
type: number
x-terraform-field-name: betterExampleNumberName # this enables service providers to override the property name with a different name; and if the name is again not terraform compliant the same conversion will be applied on the value - the result will be better_example_number_name
Corresponding terraform configuration view:
resource "swaggercodegen_cdns_v1" "my_cdn" {
example_int = 12
better_example_number_name = 1.12
}
Changelog
2595658 addressing PR comments
7d763ee update documentation with new extension (x-terraform-field-name) support
ae0dc74 loosen up constraints about expected status codes
5fdc54f get latest version of http client
6355df4 fix test after adding auto field terraform name conversions
8816dca quick rename to be consistent when referring to resourceLocalData
f593517 create isIDProperty to reduce boiler plate
ba1e30e wrap state operations in methods that handle name conversion
8d33cba convert to terraform compliant name when saving payload data into state and reading from it
24c489d refactor swaggercodegen example to handle better model object
38f9260 convert to terraform compliant name when getting payload from data
c851659 automatically convert security schemes names that are not terraform name compliant
8c6eb18 add support for extension x-terraform-field-name
9b939b0 dep add github.com/iancoleman/strcase
482b893 fix versions