From e63229c5d422a5a032136c0bcc18d4a9f756050d Mon Sep 17 00:00:00 2001 From: Giovanni Gargiulo Date: Wed, 24 Jan 2024 11:13:07 +0000 Subject: [PATCH] chore: renamed packages, docker iamges and references to metadata-server --- .github/ISSUE_TEMPLATE/config.yaml | 6 +++--- .github/workflows/publish.yaml | 2 +- CONTRIBUTING.md | 8 ++++---- README.md | 18 +++++++++--------- api/pom.xml | 8 ++++---- .../TokenMetadataRegistryApplication.java} | 6 +++--- .../config/DatabaseConnectionParameters.java | 2 +- .../api/config/DatasourceConfig.java | 2 +- .../OffchainMetadataRegistryConfig.java | 2 +- .../api/config/SpringWebSecurityConfig.java | 2 +- .../registry}/api/controller/MetadataApi.java | 8 ++++---- .../api/controller/MetadataApiController.java | 12 ++++++------ .../registry}/api/controller/V2Api.java | 4 ++-- .../api/controller/V2ApiController.java | 14 ++++++-------- .../api/indexer/FetchMetadataResultSet.java | 4 ++-- .../api/indexer/V1ApiMetadataIndexer.java | 4 ++-- .../api/indexer/V2ApiMetadataIndexer.java | 6 ++++-- .../V1ApiPostgresMetadataIndexer.java | 10 +++++----- .../V2ApiPostgresMetadataIndexer.java | 18 +++++++++--------- .../postgresql/data/MetadataQueryResult.java | 4 ++-- .../data/WalletScamLookupQueryResult.java | 2 +- .../api/model/rest/AnnotatedSignature.java | 2 +- .../api/model/rest/BatchRequest.java | 2 +- .../api/model/rest/BatchResponse.java | 2 +- .../api/model/rest/FilterOperand.java | 2 +- .../api/model/rest/PivotDirection.java | 2 +- .../api/model/rest/SubjectsResponse.java | 2 +- .../api/model/rest/TokenMetadata.java | 4 ++-- .../api/model/rest/TokenMetadataProperty.java | 3 +-- .../api/model/rest/VerifyFailureResponse.java | 2 +- .../api/model/rest/WalletFraudIncident.java | 2 +- .../api/model/rest/WalletHashes.java | 2 +- .../model/rest/WalletTrustCheckResponse.java | 2 +- .../wellknownproperties/DecimalsProperty.java | 4 ++-- .../DescriptionProperty.java | 4 ++-- .../wellknownproperties/LogoProperty.java | 4 ++-- .../wellknownproperties/NameProperty.java | 4 ++-- .../wellknownproperties/TickerProperty.java | 4 ++-- .../rest/wellknownproperties/UrlProperty.java | 4 ++-- .../api/MetadataApiV1IntegrationTest.java | 16 ++++++++-------- .../api/MetadataApiV2IntegrationTest.java | 19 +++++++++---------- ...okenMetadataRegistryApplicationTests.java} | 4 ++-- cli/pom.xml | 8 ++++---- deploy/argocd-bootstrap/init-dev-mainnet.sh | 12 ++++++------ .../templates/00-main-app.yaml | 2 +- deploy/argocd-bootstrap/values.yaml | 4 ++-- pom.xml | 10 +++++----- 47 files changed, 133 insertions(+), 135 deletions(-) rename api/src/main/java/org/cardanofoundation/{metadatatools/api/MetadataApiApplication.java => tokenmetadata/registry/api/TokenMetadataRegistryApplication.java} (84%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/config/DatabaseConnectionParameters.java (75%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/config/DatasourceConfig.java (94%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/config/OffchainMetadataRegistryConfig.java (92%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/config/SpringWebSecurityConfig.java (95%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/controller/MetadataApi.java (94%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/controller/MetadataApiController.java (86%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/controller/V2Api.java (99%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/controller/V2ApiController.java (94%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/FetchMetadataResultSet.java (56%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/V1ApiMetadataIndexer.java (77%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/V2ApiMetadataIndexer.java (75%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java (92%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java (95%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/postgresql/data/MetadataQueryResult.java (97%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/indexer/postgresql/data/WalletScamLookupQueryResult.java (93%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/AnnotatedSignature.java (87%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/BatchRequest.java (90%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/BatchResponse.java (87%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/FilterOperand.java (91%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/PivotDirection.java (91%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/SubjectsResponse.java (87%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/TokenMetadata.java (95%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/TokenMetadataProperty.java (90%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/VerifyFailureResponse.java (87%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/WalletFraudIncident.java (93%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/WalletHashes.java (87%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/WalletTrustCheckResponse.java (88%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/wellknownproperties/DecimalsProperty.java (77%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/wellknownproperties/DescriptionProperty.java (73%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/wellknownproperties/LogoProperty.java (67%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/wellknownproperties/NameProperty.java (73%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/wellknownproperties/TickerProperty.java (73%) rename api/src/main/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/model/rest/wellknownproperties/UrlProperty.java (76%) rename api/src/test/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/MetadataApiV1IntegrationTest.java (89%) rename api/src/test/java/org/cardanofoundation/{metadatatools => tokenmetadata/registry}/api/MetadataApiV2IntegrationTest.java (87%) rename api/src/test/java/org/cardanofoundation/{metadatatools/api/MetadataApiApplicationTests.java => tokenmetadata/registry/api/TokenMetadataRegistryApplicationTests.java} (68%) diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml index 8290188..9b2ce84 100644 --- a/.github/ISSUE_TEMPLATE/config.yaml +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -1,13 +1,13 @@ blank_issues_enabled: true contact_links: - name: Contributing guidelines - url: https://github.com/cardano-foundation/cf-metadata-server/blob/main/CONTRIBUTING.md + url: https://github.com/cardano-foundation/cf-token-metadata-registry/blob/main/CONTRIBUTING.md about: Some rules & processes we honor. - name: Feature ideas - url: https://github.com/cardano-foundation/cf-metadata-server/discussions/categories/ideas + url: https://github.com/cardano-foundation/cf-token-metadata-registry/discussions/categories/ideas about: Maybe someone else had the same or a similar idea already? - name: All issues - url: https://github.com/cardano-foundation/cf-metadata-server/issues + url: https://github.com/cardano-foundation/cf-token-metadata-registry/issues about: Check whether your issue is not already covered here. \ No newline at end of file diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8723994..708de50 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -43,7 +43,7 @@ jobs: api: runs-on: ubuntu-latest env: - APP_NAME: cf-metadata-server + APP_NAME: cf-token-metadata-registry needs: build-version steps: - name: Checkout diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2f428a..9d07ab7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ This document contains guidelines to help you get started and how to make sure y Should you have any questions or need some help in getting set up, you can use these communication channels to reach the team and get answers in a way where others can benefit from it as well: -- Github [Discussions](https://github.com/cardano-foundation/cf-metadata-server/discussions) +- Github [Discussions](https://github.com/cardano-foundation/cf-token-metadata-registry/discussions) - Cardano [StackExchange](https://cardano.stackexchange.com/) using the `cip26` tag ## Your first contribution @@ -21,11 +21,11 @@ Also, take a look at the tests. Making sure we have the best high quality test s ### Documentation + translations -We host our documentation / user manual in the [Wiki](https://github.com/cardano-foundation/cf-metadata-server/wiki) and [README](./README.md). +We host our documentation / user manual in the [Wiki](https://github.com/cardano-foundation/cf-token-metadata-registry/wiki) and [README](./README.md). ### Bug reports -[Submit an issue](https://github.com/cardano-foundation/cf-metadata-server/issues/new). +[Submit an issue](https://github.com/cardano-foundation/cf-token-metadata-registry/issues/new). For bug reports, it's very important to explain * what version you used, @@ -37,7 +37,7 @@ For bug reports, it's very important to explain Feature ideas are precursors to high-level features items, which will be discussed and fleshed out to ideally become items on our feature roadmap. -We use the [Ideas discussions category](https://github.com/cardano-foundation/cf-metadata-server/discussions/categories/ideas) to discuss and vote on feature ideas, but you can also [submit an issue](https://github.com/cardano-foundation/cf-metadata-server/issues/new) using the "Feature idea :thought_balloon:" template and we convert that to a discussion. +We use the [Ideas discussions category](https://github.com/cardano-foundation/cf-token-metadata-registry/discussions/categories/ideas) to discuss and vote on feature ideas, but you can also [submit an issue](https://github.com/cardano-foundation/cf-token-metadata-registry/issues/new) using the "Feature idea :thought_balloon:" template and we convert that to a discussion. We expect a description of * why you (or the user) need/want something (e.g. problem, challenge, pain, benefit), and diff --git a/README.md b/README.md index 0f4f6b7..a7598c2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -[![License](https://img.shields.io/github/license/cardano-foundation/cf-metadata-server)](https://github.com/cardano-foundation/cf-metadata-server/blob/main/LICENSE) -![GitHub top language](https://img.shields.io/github/languages/top/cardano-foundation/cf-metadata-server) -[![Build](https://github.com/cardano-foundation/cf-metadata-server/actions/workflows/main.yaml/badge.svg)](https://github.com/cardano-foundation/cf-metadata-server/actions/workflows/main.yaml) -[![CodeQL](https://github.com/cardano-foundation/cf-metadata-server/actions/workflows/codeql.yaml/badge.svg)](https://github.com/cardano-foundation/cf-metadata-server/actions/workflows/codeql.yaml) -![coverage](https://github.com/cardano-foundation/cf-metadata-server/blob/badges/jacoco.svg) -![branches](https://github.com/cardano-foundation/cf-metadata-server/blob/badges/branches.svg) -[![Issues](https://img.shields.io/github/issues/cardano-foundation/cf-metadata-server)](https://github.com/cardano-foundation/cf-metadata-server/issues) +[![License](https://img.shields.io/github/license/cardano-foundation/cf-token-metadata-registry)](https://github.com/cardano-foundation/cf-token-metadata-registry/blob/main/LICENSE) +![GitHub top language](https://img.shields.io/github/languages/top/cardano-foundation/cf-token-metadata-registry) +[![Build](https://github.com/cardano-foundation/cf-token-metadata-registry/actions/workflows/main.yaml/badge.svg)](https://github.com/cardano-foundation/cf-token-metadata-registry/actions/workflows/main.yaml) +[![CodeQL](https://github.com/cardano-foundation/cf-token-metadata-registry/actions/workflows/codeql.yaml/badge.svg)](https://github.com/cardano-foundation/cf-token-metadata-registry/actions/workflows/codeql.yaml) +![coverage](https://github.com/cardano-foundation/cf-token-metadata-registry/blob/badges/jacoco.svg) +![branches](https://github.com/cardano-foundation/cf-token-metadata-registry/blob/badges/branches.svg) +[![Issues](https://img.shields.io/github/issues/cardano-foundation/cf-token-metadata-registry)](https://github.com/cardano-foundation/cf-token-metadata-registry/issues) --- @@ -27,12 +27,12 @@ For building you need ### Building from source Clone this repository ```console -$ git clone git@github.com:cardano-foundation/cf-metadata-server.git +$ git clone git@github.com:cardano-foundation/cf-token-metadata-registry.git ``` `cd` into the directory where `git` did clone the sources into and build the application via Maven ```console -$ cd cf-metadata-server +$ cd cf-token-metadata-registry $ mvn package ``` diff --git a/api/pom.xml b/api/pom.xml index 78b844f..6154265 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -16,14 +16,14 @@ jar - scm:git:git://github.com/cardano-foundation/cf-metadata-server.git - https://github.com/cardano-foundation/cf-metadata-server - scm:git:git://github.com/cardano-foundation/cf-metadata-server.git + scm:git:git://github.com/cardano-foundation/cf-token-metadata-registry.git + https://github.com/cardano-foundation/cf-token-metadata-registry + scm:git:git://github.com/cardano-foundation/cf-token-metadata-registry.git HEAD - https://github.com/cardano-foundation/cf-metadata-server/issues + https://github.com/cardano-foundation/cf-token-metadata-registry/issues GitHub issues diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/MetadataApiApplication.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplication.java similarity index 84% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/MetadataApiApplication.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplication.java index bad3f07..ccfba56 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/MetadataApiApplication.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplication.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api; +package org.cardanofoundation.tokenmetadata.registry.api; import jakarta.servlet.DispatcherType; import org.springframework.boot.SpringApplication; @@ -11,9 +11,9 @@ import java.util.List; @SpringBootApplication -public class MetadataApiApplication { +public class TokenMetadataRegistryApplication { public static void main(String[] args) { - SpringApplication.run(MetadataApiApplication.class, args); + SpringApplication.run(TokenMetadataRegistryApplication.class, args); } @Bean diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/DatabaseConnectionParameters.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/DatabaseConnectionParameters.java similarity index 75% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/config/DatabaseConnectionParameters.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/DatabaseConnectionParameters.java index 4b7ea90..1ed6f27 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/DatabaseConnectionParameters.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/DatabaseConnectionParameters.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.config; +package org.cardanofoundation.tokenmetadata.registry.api.config; import lombok.*; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/DatasourceConfig.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/DatasourceConfig.java similarity index 94% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/config/DatasourceConfig.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/DatasourceConfig.java index 6e8d3bc..aa7b869 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/DatasourceConfig.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/DatasourceConfig.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.config; +package org.cardanofoundation.tokenmetadata.registry.api.config; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Value; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/OffchainMetadataRegistryConfig.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/OffchainMetadataRegistryConfig.java similarity index 92% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/config/OffchainMetadataRegistryConfig.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/OffchainMetadataRegistryConfig.java index f9015e1..1b90a9d 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/OffchainMetadataRegistryConfig.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/OffchainMetadataRegistryConfig.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.config; +package org.cardanofoundation.tokenmetadata.registry.api.config; import java.util.Map; import lombok.Data; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/SpringWebSecurityConfig.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/SpringWebSecurityConfig.java similarity index 95% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/config/SpringWebSecurityConfig.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/SpringWebSecurityConfig.java index 0b8a06b..151c97c 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/config/SpringWebSecurityConfig.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/config/SpringWebSecurityConfig.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.config; +package org.cardanofoundation.tokenmetadata.registry.api.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/MetadataApi.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/MetadataApi.java similarity index 94% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/controller/MetadataApi.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/MetadataApi.java index 80cc3c2..07b7f29 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/MetadataApi.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/MetadataApi.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.controller; +package org.cardanofoundation.tokenmetadata.registry.api.controller; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -7,9 +7,9 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; -import org.cardanofoundation.metadatatools.api.model.rest.BatchRequest; -import org.cardanofoundation.metadatatools.api.model.rest.BatchResponse; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.BatchRequest; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.BatchResponse; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/MetadataApiController.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/MetadataApiController.java similarity index 86% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/controller/MetadataApiController.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/MetadataApiController.java index 6a95768..d3ec483 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/MetadataApiController.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/MetadataApiController.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.controller; +package org.cardanofoundation.tokenmetadata.registry.api.controller; import java.util.ArrayList; import java.util.List; @@ -6,11 +6,11 @@ import java.util.Map; import jakarta.validation.constraints.NotNull; import lombok.extern.log4j.Log4j2; -import org.cardanofoundation.metadatatools.api.config.OffchainMetadataRegistryConfig; -import org.cardanofoundation.metadatatools.api.indexer.V1ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.model.rest.BatchRequest; -import org.cardanofoundation.metadatatools.api.model.rest.BatchResponse; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.config.OffchainMetadataRegistryConfig; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V1ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.BatchRequest; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.BatchResponse; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/V2Api.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/V2Api.java similarity index 99% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/controller/V2Api.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/V2Api.java index 36cf286..c456e67 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/V2Api.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/V2Api.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.controller; +package org.cardanofoundation.tokenmetadata.registry.api.controller; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; @@ -12,7 +12,7 @@ import jakarta.validation.constraints.Max; import jakarta.validation.constraints.Min; import jakarta.validation.constraints.NotNull; -import org.cardanofoundation.metadatatools.api.model.rest.*; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.*; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/V2ApiController.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/V2ApiController.java similarity index 94% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/controller/V2ApiController.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/V2ApiController.java index a7aae40..e3e9363 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/controller/V2ApiController.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/controller/V2ApiController.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.controller; +package org.cardanofoundation.tokenmetadata.registry.api.controller; import java.time.LocalDate; import java.util.*; @@ -7,15 +7,13 @@ import java.util.stream.Collectors; import jakarta.validation.constraints.NotNull; import lombok.extern.log4j.Log4j2; -import org.apache.commons.lang3.StringUtils; -import org.cardanofoundation.metadatatools.api.config.OffchainMetadataRegistryConfig; -import org.cardanofoundation.metadatatools.api.indexer.FetchMetadataResultSet; -import org.cardanofoundation.metadatatools.api.indexer.V1ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.indexer.V2ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.model.rest.*; +import org.cardanofoundation.tokenmetadata.registry.api.config.OffchainMetadataRegistryConfig; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.FetchMetadataResultSet; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V1ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V2ApiMetadataIndexer; import org.cardanofoundation.metadatatools.core.cip26.MetadataCreator; -import org.cardanofoundation.metadatatools.core.cip26.MetadataValidationRules; import org.cardanofoundation.metadatatools.core.cip26.ValidationResult; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/FetchMetadataResultSet.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/FetchMetadataResultSet.java similarity index 56% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/FetchMetadataResultSet.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/FetchMetadataResultSet.java index a52281e..f721785 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/FetchMetadataResultSet.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/FetchMetadataResultSet.java @@ -1,9 +1,9 @@ -package org.cardanofoundation.metadatatools.api.indexer; +package org.cardanofoundation.tokenmetadata.registry.api.indexer; import java.util.List; import lombok.Builder; import lombok.Data; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; @Data @Builder diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/V1ApiMetadataIndexer.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/V1ApiMetadataIndexer.java similarity index 77% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/V1ApiMetadataIndexer.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/V1ApiMetadataIndexer.java index 3d59002..79bba7c 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/V1ApiMetadataIndexer.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/V1ApiMetadataIndexer.java @@ -1,9 +1,9 @@ -package org.cardanofoundation.metadatatools.api.indexer; +package org.cardanofoundation.tokenmetadata.registry.api.indexer; import java.util.List; import java.util.Map; import java.util.Optional; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; public interface V1ApiMetadataIndexer { Map findSubjectsSelectProperties( diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/V2ApiMetadataIndexer.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/V2ApiMetadataIndexer.java similarity index 75% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/V2ApiMetadataIndexer.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/V2ApiMetadataIndexer.java index f02f3ef..41c3e67 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/V2ApiMetadataIndexer.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/V2ApiMetadataIndexer.java @@ -1,8 +1,10 @@ -package org.cardanofoundation.metadatatools.api.indexer; +package org.cardanofoundation.tokenmetadata.registry.api.indexer; import java.time.LocalDate; import java.util.List; -import org.cardanofoundation.metadatatools.api.model.rest.*; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.FilterOperand; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.PivotDirection; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.WalletFraudIncident; public interface V2ApiMetadataIndexer { List findScamIncidents(final List walletAddressHashes); diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java similarity index 92% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java index 2594326..c0161c5 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/V1ApiPostgresMetadataIndexer.java @@ -1,11 +1,11 @@ -package org.cardanofoundation.metadatatools.api.indexer.postgresql; +package org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.log4j.Log4j2; -import org.cardanofoundation.metadatatools.api.indexer.V1ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.indexer.postgresql.data.MetadataQueryResult; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V1ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql.data.MetadataQueryResult; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; @@ -23,7 +23,7 @@ public class V1ApiPostgresMetadataIndexer implements V1ApiMetadataIndexer { @Autowired private NamedParameterJdbcTemplate jdbcTemplate; private static Map metadataFromQueryResults( - @NotNull final List queryResults, @NotNull final List properties) + @NotNull final List queryResults, @NotNull final List properties) throws IllegalArgumentException { final Map metadata = new HashMap<>(); final ObjectMapper valueMapper = new ObjectMapper(); diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java similarity index 95% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java index c61b7ff..e34c72d 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/V2ApiPostgresMetadataIndexer.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.indexer.postgresql; +package org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql; import static java.util.Map.entry; @@ -8,14 +8,14 @@ import java.util.stream.Collectors; import jakarta.validation.constraints.NotNull; import lombok.extern.log4j.Log4j2; -import org.cardanofoundation.metadatatools.api.indexer.FetchMetadataResultSet; -import org.cardanofoundation.metadatatools.api.indexer.V2ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.indexer.postgresql.data.MetadataQueryResult; -import org.cardanofoundation.metadatatools.api.indexer.postgresql.data.WalletScamLookupQueryResult; -import org.cardanofoundation.metadatatools.api.model.rest.FilterOperand; -import org.cardanofoundation.metadatatools.api.model.rest.PivotDirection; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; -import org.cardanofoundation.metadatatools.api.model.rest.WalletFraudIncident; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.FetchMetadataResultSet; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V2ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql.data.MetadataQueryResult; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql.data.WalletScamLookupQueryResult; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.FilterOperand; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.PivotDirection; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.WalletFraudIncident; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/data/MetadataQueryResult.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/data/MetadataQueryResult.java similarity index 97% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/data/MetadataQueryResult.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/data/MetadataQueryResult.java index 7048778..43ac76a 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/data/MetadataQueryResult.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/data/MetadataQueryResult.java @@ -1,10 +1,10 @@ -package org.cardanofoundation.metadatatools.api.indexer.postgresql.data; +package org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql.data; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.*; import lombok.extern.log4j.Log4j2; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; import org.postgresql.util.PGobject; import jakarta.validation.constraints.NotNull; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/data/WalletScamLookupQueryResult.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/data/WalletScamLookupQueryResult.java similarity index 93% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/data/WalletScamLookupQueryResult.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/data/WalletScamLookupQueryResult.java index 0da0b98..c15fa9f 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/indexer/postgresql/data/WalletScamLookupQueryResult.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/indexer/postgresql/data/WalletScamLookupQueryResult.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.indexer.postgresql.data; +package org.cardanofoundation.tokenmetadata.registry.api.indexer.postgresql.data; import lombok.*; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/AnnotatedSignature.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/AnnotatedSignature.java similarity index 87% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/AnnotatedSignature.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/AnnotatedSignature.java index fffd8b5..938eee0 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/AnnotatedSignature.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/AnnotatedSignature.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/BatchRequest.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/BatchRequest.java similarity index 90% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/BatchRequest.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/BatchRequest.java index 3f4efa4..2aab867 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/BatchRequest.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/BatchRequest.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/BatchResponse.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/BatchResponse.java similarity index 87% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/BatchResponse.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/BatchResponse.java index 1c49104..4280667 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/BatchResponse.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/BatchResponse.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/FilterOperand.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/FilterOperand.java similarity index 91% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/FilterOperand.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/FilterOperand.java index efb8e62..e81b567 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/FilterOperand.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/FilterOperand.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/PivotDirection.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/PivotDirection.java similarity index 91% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/PivotDirection.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/PivotDirection.java index 6cf593c..1ff3861 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/PivotDirection.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/PivotDirection.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/SubjectsResponse.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/SubjectsResponse.java similarity index 87% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/SubjectsResponse.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/SubjectsResponse.java index 5de5b84..ab96626 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/SubjectsResponse.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/SubjectsResponse.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/TokenMetadata.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/TokenMetadata.java similarity index 95% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/TokenMetadata.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/TokenMetadata.java index 198fb5d..1b96436 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/TokenMetadata.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/TokenMetadata.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -7,10 +7,10 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.extern.log4j.Log4j2; -import org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties.*; import jakarta.validation.Valid; import org.cardanofoundation.metadatatools.core.cip26.model.Metadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties.*; import java.util.Date; import java.util.HashMap; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/TokenMetadataProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/TokenMetadataProperty.java similarity index 90% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/TokenMetadataProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/TokenMetadataProperty.java index 1460151..ff8e6b1 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/TokenMetadataProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/TokenMetadataProperty.java @@ -1,9 +1,8 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/VerifyFailureResponse.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/VerifyFailureResponse.java similarity index 87% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/VerifyFailureResponse.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/VerifyFailureResponse.java index c767161..62fee5b 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/VerifyFailureResponse.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/VerifyFailureResponse.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletFraudIncident.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletFraudIncident.java similarity index 93% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletFraudIncident.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletFraudIncident.java index 0ede919..e26202e 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletFraudIncident.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletFraudIncident.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletHashes.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletHashes.java similarity index 87% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletHashes.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletHashes.java index 76b6cc4..b24e0e0 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletHashes.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletHashes.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletTrustCheckResponse.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletTrustCheckResponse.java similarity index 88% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletTrustCheckResponse.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletTrustCheckResponse.java index 9f18ad6..5ff19af 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/WalletTrustCheckResponse.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/WalletTrustCheckResponse.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api.model.rest; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/DecimalsProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/DecimalsProperty.java similarity index 77% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/DecimalsProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/DecimalsProperty.java index 8ab7465..c9d88b6 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/DecimalsProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/DecimalsProperty.java @@ -1,10 +1,10 @@ -package org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadataProperty; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadataProperty; import jakarta.validation.Valid; import jakarta.validation.constraints.DecimalMax; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/DescriptionProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/DescriptionProperty.java similarity index 73% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/DescriptionProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/DescriptionProperty.java index 0e77a17..82a687b 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/DescriptionProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/DescriptionProperty.java @@ -1,10 +1,10 @@ -package org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadataProperty; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadataProperty; import jakarta.validation.Valid; import jakarta.validation.constraints.Size; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/LogoProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/LogoProperty.java similarity index 67% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/LogoProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/LogoProperty.java index 8efb43f..d943caf 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/LogoProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/LogoProperty.java @@ -1,11 +1,11 @@ -package org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadataProperty; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadataProperty; @Data @EqualsAndHashCode(callSuper = true) diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/NameProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/NameProperty.java similarity index 73% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/NameProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/NameProperty.java index 2d10b79..0b4dc89 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/NameProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/NameProperty.java @@ -1,10 +1,10 @@ -package org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadataProperty; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadataProperty; import jakarta.validation.Valid; import jakarta.validation.constraints.Size; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/TickerProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/TickerProperty.java similarity index 73% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/TickerProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/TickerProperty.java index c7130fa..ce6ae86 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/TickerProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/TickerProperty.java @@ -1,10 +1,10 @@ -package org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadataProperty; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadataProperty; import jakarta.validation.Valid; import jakarta.validation.constraints.Size; diff --git a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/UrlProperty.java b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/UrlProperty.java similarity index 76% rename from api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/UrlProperty.java rename to api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/UrlProperty.java index 3ad0657..302df06 100644 --- a/api/src/main/java/org/cardanofoundation/metadatatools/api/model/rest/wellknownproperties/UrlProperty.java +++ b/api/src/main/java/org/cardanofoundation/tokenmetadata/registry/api/model/rest/wellknownproperties/UrlProperty.java @@ -1,10 +1,10 @@ -package org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties; +package org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadataProperty; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadataProperty; import jakarta.validation.Valid; import jakarta.validation.constraints.Pattern; diff --git a/api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiV1IntegrationTest.java b/api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/MetadataApiV1IntegrationTest.java similarity index 89% rename from api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiV1IntegrationTest.java rename to api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/MetadataApiV1IntegrationTest.java index adfb9fd..deae9a3 100644 --- a/api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiV1IntegrationTest.java +++ b/api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/MetadataApiV1IntegrationTest.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api; +package org.cardanofoundation.tokenmetadata.registry.api; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; @@ -8,13 +8,13 @@ import java.math.BigDecimal; import java.util.List; import java.util.Optional; -import org.cardanofoundation.metadatatools.api.config.OffchainMetadataRegistryConfig; -import org.cardanofoundation.metadatatools.api.config.SpringWebSecurityConfig; -import org.cardanofoundation.metadatatools.api.controller.MetadataApiController; -import org.cardanofoundation.metadatatools.api.indexer.V1ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.model.rest.AnnotatedSignature; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; -import org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties.UrlProperty; +import org.cardanofoundation.tokenmetadata.registry.api.config.OffchainMetadataRegistryConfig; +import org.cardanofoundation.tokenmetadata.registry.api.config.SpringWebSecurityConfig; +import org.cardanofoundation.tokenmetadata.registry.api.controller.MetadataApiController; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V1ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.AnnotatedSignature; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties.UrlProperty; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiV2IntegrationTest.java b/api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/MetadataApiV2IntegrationTest.java similarity index 87% rename from api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiV2IntegrationTest.java rename to api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/MetadataApiV2IntegrationTest.java index 170837f..1990cc4 100644 --- a/api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiV2IntegrationTest.java +++ b/api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/MetadataApiV2IntegrationTest.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api; +package org.cardanofoundation.tokenmetadata.registry.api; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; @@ -8,15 +8,14 @@ import java.math.BigDecimal; import java.util.List; import java.util.Optional; -import org.cardanofoundation.metadatatools.api.config.OffchainMetadataRegistryConfig; -import org.cardanofoundation.metadatatools.api.config.SpringWebSecurityConfig; -import org.cardanofoundation.metadatatools.api.controller.MetadataApiController; -import org.cardanofoundation.metadatatools.api.controller.V2ApiController; -import org.cardanofoundation.metadatatools.api.indexer.V1ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.indexer.V2ApiMetadataIndexer; -import org.cardanofoundation.metadatatools.api.model.rest.AnnotatedSignature; -import org.cardanofoundation.metadatatools.api.model.rest.TokenMetadata; -import org.cardanofoundation.metadatatools.api.model.rest.wellknownproperties.UrlProperty; +import org.cardanofoundation.tokenmetadata.registry.api.config.OffchainMetadataRegistryConfig; +import org.cardanofoundation.tokenmetadata.registry.api.config.SpringWebSecurityConfig; +import org.cardanofoundation.tokenmetadata.registry.api.controller.V2ApiController; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V1ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.indexer.V2ApiMetadataIndexer; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.AnnotatedSignature; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.TokenMetadata; +import org.cardanofoundation.tokenmetadata.registry.api.model.rest.wellknownproperties.UrlProperty; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiApplicationTests.java b/api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplicationTests.java similarity index 68% rename from api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiApplicationTests.java rename to api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplicationTests.java index 031a194..6829d5d 100644 --- a/api/src/test/java/org/cardanofoundation/metadatatools/api/MetadataApiApplicationTests.java +++ b/api/src/test/java/org/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplicationTests.java @@ -1,4 +1,4 @@ -package org.cardanofoundation.metadatatools.api; +package org.cardanofoundation.tokenmetadata.registry.api; import org.junit.jupiter.api.Test; import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest; @@ -6,7 +6,7 @@ @JdbcTest @ActiveProfiles("test") -class MetadataApiApplicationTests { +class TokenMetadataRegistryApplicationTests { @Test void contextLoads() {} } diff --git a/cli/pom.xml b/cli/pom.xml index 73e6614..4aa3ca6 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -15,14 +15,14 @@ jar - scm:git:git://github.com/cardano-foundation/cf-metadata-server.git - https://github.com/cardano-foundation/cf-metadata-server - scm:git:git://github.com/cardano-foundation/cf-metadata-server.git + scm:git:git://github.com/cardano-foundation/cf-token-metadata-registry.git + https://github.com/cardano-foundation/cf-token-metadata-registry + scm:git:git://github.com/cardano-foundation/cf-token-metadata-registry.git HEAD - https://github.com/cardano-foundation/cf-metadata-server/issues + https://github.com/cardano-foundation/cf-token-metadata-registry/issues GitHub issues diff --git a/deploy/argocd-bootstrap/init-dev-mainnet.sh b/deploy/argocd-bootstrap/init-dev-mainnet.sh index 931b5f5..91862a9 100755 --- a/deploy/argocd-bootstrap/init-dev-mainnet.sh +++ b/deploy/argocd-bootstrap/init-dev-mainnet.sh @@ -10,16 +10,16 @@ if [ $? != 0 ]; then kubectl create ns argocd > /dev/null 2>&1 fi -echo "Checking cf-metadata-server namespace existence" -kubectl get ns cf-metadata-server > /dev/null 2>&1 +echo "Checking cf-token-metadata-registry namespace existence" +kubectl get ns cf-token-metadata-registry > /dev/null 2>&1 if [ $? != 0 ]; then - echo "cf-metadata-server namespace does not exist, creating..." - kubectl create ns cf-metadata-server > /dev/null 2>&1 + echo "cf-token-metadata-registry namespace does not exist, creating..." + kubectl create ns cf-token-metadata-registry > /dev/null 2>&1 fi ## DockerHub secret -kubectl create secret -n cf-metadata-server generic regcred \ +kubectl create secret -n cf-token-metadata-registry generic regcred \ --from-file=.dockerconfigjson=../../.keys/docker-cred.json \ --type=kubernetes.io/dockerconfigjson \ --save-config \ @@ -33,7 +33,7 @@ kubectl create secret generic github-deploy-key \ --dry-run=client \ -o yaml \ -n argocd \ - --from-file=../../.keys/cf-metadata-server \ + --from-file=../../.keys/cf-token-metadata-registry \ | kubectl apply -f - exit 0 diff --git a/deploy/argocd-bootstrap/templates/00-main-app.yaml b/deploy/argocd-bootstrap/templates/00-main-app.yaml index fe2d5b2..cc35e81 100644 --- a/deploy/argocd-bootstrap/templates/00-main-app.yaml +++ b/deploy/argocd-bootstrap/templates/00-main-app.yaml @@ -7,7 +7,7 @@ metadata: spec: project: default source: - repoURL: git@github.com:cardano-foundation/cf-metadata-server.git + repoURL: git@github.com:cardano-foundation/cf-token-metadata-registry.git targetRevision: {{ .Values.git.targetRevision | default "HEAD" }} path: {{ .Values.mainAppPath }} helm: diff --git a/deploy/argocd-bootstrap/values.yaml b/deploy/argocd-bootstrap/values.yaml index 1faaa37..e6d2580 100644 --- a/deploy/argocd-bootstrap/values.yaml +++ b/deploy/argocd-bootstrap/values.yaml @@ -26,10 +26,10 @@ argo-cd: - url: https://opensource.zalando.com/postgres-operator/charts/postgres-operator name: postgres-operator-charts type: helm - - url: git@github.com:cardano-foundation/cf-metadata-server.git + - url: git@github.com:cardano-foundation/cf-token-metadata-registry.git sshPrivateKeySecret: name: github-deploy-key - key: cf-metadata-server + key: cf-token-metadata-registry resource.customizations: | networking.k8s.io/Ingress: health.lua: | diff --git a/pom.xml b/pom.xml index ae6949a..0057b19 100644 --- a/pom.xml +++ b/pom.xml @@ -10,14 +10,14 @@ pom - scm:git:git://github.com/cardano-foundation/cf-metadata-server.git - https://github.com/cardano-foundation/cf-metadata-server - scm:git:git://github.com/cardano-foundation/cf-metadata-server.git + scm:git:git://github.com/cardano-foundation/cf-token-metadata-registry.git + https://github.com/cardano-foundation/cf-token-metadata-registry + scm:git:git://github.com/cardano-foundation/cf-token-metadata-registry.git HEAD - https://github.com/cardano-foundation/cf-metadata-server/issues + https://github.com/cardano-foundation/cf-token-metadata-registry/issues GitHub issues @@ -156,7 +156,7 @@ github cardano-foundation - https://maven.pkg.github.com/cardano-foundation/cf-metadata-server + https://maven.pkg.github.com/cardano-foundation/cf-token-metadata-registry