Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: DID URL dereferencing #146

Merged
merged 13 commits into from
Apr 28, 2023
Merged

feat: DID URL dereferencing #146

merged 13 commits into from
Apr 28, 2023

Conversation

lampkin-diet
Copy link
Contributor

No description provided.

dependabot bot and others added 13 commits April 4, 2023 09:50
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 21.0.0 to 21.0.1.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](semantic-release/semantic-release@v21.0.0...v21.0.1)

---
updated-dependencies:
- dependency-name: semantic-release
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.5 to 1.27.6.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.27.5...v1.27.6)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ts in get DIDDoc versions API [DEV-2413] (#131)

* Fix problem that returns response from APIs:
- get DIDDoc version metadata;
- get DIDDoc versions.

* Update an incorrect integration tests for getting
DIDDoc versions.

* Fix problem with an infinity redirects in get
DIDDoc Versions API.
…V-2311] (#122)

* Add integration test data payloads.

* Add integration test constants.

* Create test runner for running integration tests.

* Add positive integration tests for getting DIDDoc.

* Add negative integration tests for getting DIDDoc.

* Update go.mod and go.sum files.

* Move DID document payloads to another folder.

* Add did#fragment query payloads for integration
tests.

* Rename testCase member variable:
- from "expectedDIDResolution" to "expectedDidResolution";
- from "receivedDIDResolution" to "receivedDidResolution";
- from "expectedDIDResolution" to "expectedDidResolution".

* Add positive and integration tests for testing API
that gets DID#fragment.

* Fix golangci-lint mistakes.

* Add build tag for building integration tests.

* Fix golangci-lint mistakes.

* Add DIDDoc version payloads for using in
integration tests.

* Add DIDDoc version metadata payloads for using in
integration tests.

* Add integration tests for testing resourceMetadata

* Add integration tests for testing collection of
resources API.

* Add integration tests for testing resolver resource data
request.

* Refactor integration tests.

* Add integration tests for testing get DIDDoc
versions API.

* Add integration tests for testing get DIDDoc
version API.

* Add integration tests for testing get DIDDoc
version metadata API.

* Add integration tests for testing how is working
redirect when we try to get different API with old Indy style DID.

* Refactor and update integration tests.

* Remove an old integration tests.

* Update integration tests.

* Update integration tests for GitHub actions.

* Update GitHub action test.yml file.

* Add integration tests report file to .gitignore.

* Update test.yml

* DIDDoc version should return in resolution format.

* Uncomment integration tests.

* Add integration tests for testing accept header.

* Refactor integration tests.

* Add integration tests for testing accept-encoding
header.

* Rename folder name from "unit-tests" to "unit".

* Update test.yml file.

* Restructure integration tests folder structure.

* Add HTTP binding constants for using tests.

* Correct the names of the integration test cases.

* Add constant variables for using integration tests
instead of magic strings.
* Add integration test data payloads.

* Add integration test constants.

* Create test runner for running integration tests.

* Add positive integration tests for getting DIDDoc.

* Add negative integration tests for getting DIDDoc.

* Update go.mod and go.sum files.

* Move DID document payloads to another folder.

* Add did#fragment query payloads for integration
tests.

* Rename testCase member variable:
- from "expectedDIDResolution" to "expectedDidResolution";
- from "receivedDIDResolution" to "receivedDidResolution";
- from "expectedDIDResolution" to "expectedDidResolution".

* Add positive and integration tests for testing API
that gets DID#fragment.

* Fix golangci-lint mistakes.

* Add build tag for building integration tests.

* Fix golangci-lint mistakes.

* Add DIDDoc version payloads for using in
integration tests.

* Add DIDDoc version metadata payloads for using in
integration tests.

* Add integration tests for testing resourceMetadata

* Add integration tests for testing collection of
resources API.

* Add integration tests for testing resolver resource data
request.

* Refactor integration tests.

* Add integration tests for testing get DIDDoc
versions API.

* Add integration tests for testing get DIDDoc
version API.

* Add integration tests for testing get DIDDoc
version metadata API.

* Add integration tests for testing how is working
redirect when we try to get different API with old Indy style DID.

* Refactor and update integration tests.

* Remove an old integration tests.

* Update integration tests.

* Update integration tests for GitHub actions.

* Update GitHub action test.yml file.

* Add integration tests report file to .gitignore.

* Update test.yml

* DIDDoc version should return in resolution format.

* Uncomment integration tests.

* Add integration tests for testing accept header.

* Refactor integration tests.

* Add integration tests for testing accept-encoding
header.

* Rename folder name from "unit-tests" to "unit".

* Update test.yml file.

* Restructure integration tests folder structure.

* Remove an unused ProcessDIDRequest method.

* Move test from did_doc_service and
resource_dereferencing_service to particular handlers.

* Use constant variables instead of a header strings

* Add unit tests for testing how works a redirect
old 16/32 characters Indy style DIDs.

* Re structure unit tests.

* Add integration build flag for test_suite_test.go.

* Refactor unit tests.

* Add more unit tests for testing ledger services.

* Add HTTP binding constants for using tests.

* Correct the names of the integration test cases.

* Add constant variables for using integration tests
instead of magic strings.

* Fix type mistakes.

* Fix golangci-lint mistakes.

* Update integration tests.

* Update unit test runner command in GitHub actions.
…query is wrong or not supported [DEV-2401] (#135)

* Add integration test data payloads.

* Add integration test constants.

* Create test runner for running integration tests.

* Add positive integration tests for getting DIDDoc.

* Add negative integration tests for getting DIDDoc.

* Update go.mod and go.sum files.

* Move DID document payloads to another folder.

* Add did#fragment query payloads for integration
tests.

* Rename testCase member variable:
- from "expectedDIDResolution" to "expectedDidResolution";
- from "receivedDIDResolution" to "receivedDidResolution";
- from "expectedDIDResolution" to "expectedDidResolution".

* Add positive and integration tests for testing API
that gets DID#fragment.

* Fix golangci-lint mistakes.

* Add build tag for building integration tests.

* Fix golangci-lint mistakes.

* Add DIDDoc version payloads for using in
integration tests.

* Add DIDDoc version metadata payloads for using in
integration tests.

* Add integration tests for testing resourceMetadata

* Add integration tests for testing collection of
resources API.

* Add integration tests for testing resolver resource data
request.

* Refactor integration tests.

* Add integration tests for testing get DIDDoc
versions API.

* Add integration tests for testing get DIDDoc
version API.

* Add integration tests for testing get DIDDoc
version metadata API.

* Add integration tests for testing how is working
redirect when we try to get different API with old Indy style DID.

* Refactor and update integration tests.

* Remove an old integration tests.

* Update integration tests.

* Update integration tests for GitHub actions.

* Update GitHub action test.yml file.

* Add integration tests report file to .gitignore.

* Update test.yml

* DIDDoc version should return in resolution format.

* Uncomment integration tests.

* Add integration tests for testing accept header.

* Refactor integration tests.

* Add integration tests for testing accept-encoding
header.

* Rename folder name from "unit-tests" to "unit".

* Update test.yml file.

* Restructure integration tests folder structure.

* Remove an unused ProcessDIDRequest method.

* Move test from did_doc_service and
resource_dereferencing_service to particular handlers.

* Use constant variables instead of a header strings

* Add unit tests for testing how works a redirect
old 16/32 characters Indy style DIDs.

* Re structure unit tests.

* Add integration build flag for test_suite_test.go.

* Refactor unit tests.

* Add more unit tests for testing ledger services.

* Change `representationNotSupported` error to
`invalidDidUrl` if query is wrong or not supported.

* Add integration tests for testing get resolution
result with an invalid query.

* Change from unit to integration go build flag.

* Fix integration test mistake.

* Add HTTP binding constants for using tests.

* Correct the names of the integration test cases.

* Add constant variables for using integration tests
instead of magic strings.

* Fix type mistakes.

* Fix golangci-lint mistakes.

* Update integration tests.

* Update unit test runner command in GitHub actions.

* Update integration tests.
…V-2351] (#132)

* Add handling for only did queries and small refactoring

* Makes linter happy

* Add unit tests

* Add basic implementation for resource queries

* Small refactoring

* Add resourceVersion and handler for it

* Makes Linter happy

* Makes linter happy

* Small refactoring

* Fix unit tests for queries

* MAkes linter happy and fix integration tests

* Add more integration tests for queries

* Fixed:
- added version support
- changed logic for allowing versionId and versionTime in the same query
- added more integration tests

* Changed did doc implementation due to the latest changes in doc

* Makes linter happy

* Small validation and refactorings

* Add checksum handling and small improvements

* Fix RequestURI parameter displaying

* Makes linter happy

* Makes linter happy

* Uncomment positive integration tests

* Makes linter happy

* fix swagger build

* Change expected diddoc jsons for integration tests

* Fix PR review comments

* Makes linter happy

* Change error code

* Fix unit tests
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.29.0 to 1.29.1.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](rs/zerolog@v1.29.0...v1.29.1)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…g ? to transform keys [DEV-2208] (#137)

* Add handling for only did queries and small refactoring

* Makes linter happy

* Add unit tests

* Add basic implementation for resource queries

* Small refactoring

* Add resourceVersion and handler for it

* Makes Linter happy

* Makes linter happy

* Small refactoring

* Fix unit tests for queries

* MAkes linter happy and fix integration tests

* Add more integration tests for queries

* Fixed:
- added version support
- changed logic for allowing versionId and versionTime in the same query
- added more integration tests

* Add common functions and constants for transforming
key.

* Add implementation for supporting transformKey
query.

* Fix golangci-lint mistakes.

* Add correct commands for running unit and
integration tests.

* Refactor code and fix typo mistakes.

* Changed did doc implementation due to the latest changes in doc

* Makes linter happy

* Add payload files for transformKey query results.

* Add positive integration tests for getting DIDDoc
with transformKey query parameter.

* Add integration tests runner for running
transformKey query.

* Update incorrect last merge.

* Fix problem with an incorrect concatenation logic
ResourceURI field.

* Small validation and refactorings

* Add more positive integration tests.

* Add checksum handling and small improvements

* Add more static validation for transformKey query.

* Add negative integration tests for testing
transformKey query.

* Add validation for a combination of transformKey &
resourceType.

* Add unit tests for testing transformKey query.

* Fix RequestURI parameter displaying

* Makes linter happy

* Fix problem with go-releaser:
- problem was with command: "goreleaser build --clean --snapshot
--single-target"
- I fix that problem with run above go-releaser command manually and
that command run all make commands after that operation it updates
swagger files that were problem.

* Refactor code and integration tests.

* Update transformKey query payloads.

* Add integration tests for testing transformKey
query with old 16/32 chars style DIDs.

* Rename file from "transform_key_suite_test.go" to
"suite_test.go".

* Remove debug println.

* Update did/versions integration tests payloads.

* Fix problem with go-releaser.

* Refactor code and unit/integration tests.

* Set correct time format in unit/integration tests.

* Set correct time format in unit/integration tests.

* Fix the review comments.

---------

Co-authored-by: Andrew Nikitin <andrew.nikitin@cheqd.io>
* Add handling for only did queries and small refactoring

* Makes linter happy

* Add unit tests

* Add basic implementation for resource queries

* Small refactoring

* Add resourceVersion and handler for it

* Makes Linter happy

* Makes linter happy

* Small refactoring

* Fix unit tests for queries

* MAkes linter happy and fix integration tests

* Add more integration tests for queries

* Fixed:
- added version support
- changed logic for allowing versionId and versionTime in the same query
- added more integration tests

* Changed did doc implementation due to the latest changes in doc

* Makes linter happy

* Small validation and refactorings

* Add checksum handling and small improvements

* Fix RequestURI parameter displaying

* Makes linter happy

* Makes linter happy

* Uncomment positive integration tests

* Makes linter happy

* fix swagger build

* Change expected diddoc jsons for integration tests

* Add tests for DidDocMetadataList structure

* Fix PR review comments

* Makes linter happy

* Add tests for dereferencing content stream

* Add more unit tests

* temporary

* Add positive cases for resources and diddocs

* Fix merging with develop

* Fi transformKey tests

* Return DIDDocument if metadata=false

* Return positive tests back

* Add more tests for negative/positive cases

* Remove commented imports

* Review comments
* Actualize swagger docs

* Fix golangci-lint mistakes.

* Update swagger OpenAPI documentation.

---------

Co-authored-by: abdulla-ashurov <abdulla.ashurov@dsr-corporation.com>
…143)

* Add postfix "test" word to test package names.

* Add prototype of test cases for testing DIDDoc
supported queries.

* Add integration tests for versionId query.

* Add a negative test for testing combination of
versionId&transformKey query parameters.

* Add positive integration tests for testing
different DIDDoc query parameters.

* Add negative integration tests for testing
different DIDDoc query parameters.

* Add negative integration tests for testing
different Resource query parameters.

* Add positive integration tests for testing
different Resource query parameters.

* Add integration tests for testing
different combination of DIDDoc query parameters.

* Fix problem with integration test.

* Add integration tests for testing
different combination of Resource query parameters.

* Update DIDDoc query integration tests.

* Update integration tests.

* Fix problem with service & version query respond
format. It should be DidResolution type.

* Uncomment integration tests.

* Add service query DidResolutionQueries type.

* Add relativeRef query to DID Resolution queries.

* Add Z postfix to time format in integration test.

* Remove an unused DID param in versionTime handler

* Fix typo resource integration test runner.

* Update integration tests.

* Refactor integration tests.

* Update integration tests.

* Update integration test.

* Uncomment integration tests.

* Update collectionId integration tests payload.

* Remove typo space.

* Update resourceVersionTime query integration test.

* Fix review comments.
@lampkin-diet lampkin-diet temporarily deployed to staging April 28, 2023 14:09 — with GitHub Actions Inactive
@Tweeddalex Tweeddalex merged commit 40322dc into main Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants