Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
9e0457d
Push to github
fpotier Feb 27, 2025
c88513a
Update example
fpotier Mar 5, 2025
dbeb315
Stage
fpotier Apr 14, 2025
627cc0c
Fix example inconsistencies
fpotier Apr 23, 2025
42f6e32
Fix typo in `scicat:scicatUser` property
fpotier Apr 24, 2025
ef6430a
Upgrade Jena version
fpotier May 27, 2025
146a77f
Remove redundant schema.org class
fpotier May 27, 2025
def6df6
Update openapi specs
fpotier May 27, 2025
7e2f078
Remove auth related calls/models
fpotier May 27, 2025
7af2ae4
API specs implementation groundwork
fpotier May 27, 2025
52fdf51
Move the code to the repo's top-level
fpotier May 27, 2025
1bd1bd4
Return HTTP/400 if parsing the json-ld metadata fails
fpotier May 27, 2025
dde3563
Fix `/import` response
fpotier May 27, 2025
fd0c3b1
Fix identation
fpotier Jun 2, 2025
5d18ae8
Bump quarkus version
fpotier Jun 3, 2025
fa53305
Add docker build configuration
fpotier Jun 3, 2025
f6666d1
Ignore `.quarkus` directory
fpotier Jun 3, 2025
1733d61
Test CI
fpotier Jun 3, 2025
c9cddce
Zenodo export groundwork
fpotier Jun 3, 2025
793e1cd
Link image to repo
fpotier Jul 3, 2025
0ced1b2
Change zenodo export media type to json-ld
fpotier Jul 3, 2025
f8bf17e
Fix bug in listPublications()
fpotier Jul 4, 2025
b45ec28
Fix missing EOF
fpotier Jul 4, 2025
f650346
Auto build Docker image on `quarkus build`
fpotier Jul 4, 2025
1e051e8
Improve README
fpotier Jul 4, 2025
a74d95a
Add pre-commit config
fpotier Jul 4, 2025
8509bb0
Add XML check hook
fpotier Jul 4, 2025
cf38992
Fix all files
fpotier Jul 4, 2025
088351c
Bump pre-commit version
fpotier Jul 4, 2025
35dde77
Add some tests
fpotier Jul 4, 2025
d9e2d26
Rename job to Unit testing
fpotier Jul 4, 2025
2196ff2
Add ModelMapper dep
fpotier Jul 9, 2025
dcb8a9f
Stage progress
fpotier Jul 9, 2025
20e892a
Update tests
fpotier Jul 15, 2025
90ed05e
Annotations POC
fpotier Jul 15, 2025
e311e71
Add actionlint and release workflows
fpotier Jul 16, 2025
37f8e41
Improve Arrays serde
fpotier Jul 17, 2025
5f01e83
Refactor serialization logic
fpotier Jul 17, 2025
9ad753c
Serializer returns `Optional<Resource>`
fpotier Jul 17, 2025
f5f2473
Serialize integers as integers rather than double
fpotier Jul 17, 2025
30cab6a
Deserializer parameter sanitization
fpotier Jul 17, 2025
79443f3
Make serde methods not static
fpotier Jul 17, 2025
e99a667
Fix actionlint trigger rule
fpotier Jul 17, 2025
f185966
Refactor `RdfDeserializer`
fpotier Jul 21, 2025
2c08c3b
Bump jena version
fpotier Jul 21, 2025
f202219
Remove custom `abstract` property
fpotier Jul 21, 2025
b492f4c
Make RDF annotations public
fpotier Jul 21, 2025
1f07cec
Rename header for scicat token
fpotier Jul 21, 2025
5fcfa98
Add precommit to CI + cache devcontainer
fpotier Jul 21, 2025
cbb2ec2
Fix workflow/job name for release
fpotier Jul 21, 2025
4faf20e
Conditionnally rebuild devcontainer image
fpotier Jul 21, 2025
eb2c0b0
Add .jbang to gitignore
fpotier Jul 21, 2025
f3bb369
Remove conditional run of workflows
fpotier Jul 21, 2025
00bbf28
Remove useless builder
fpotier Jul 22, 2025
82c4fdc
Improve `/validate` error handling
fpotier Jul 22, 2025
5500014
Refactor workflows
fpotier Jul 22, 2025
fccbdf0
Switch to slf4j logger
fpotier Jul 22, 2025
1736000
Remove useless file
fpotier Jul 23, 2025
742fb5c
Fix workaround
fpotier Jul 23, 2025
8c6abd7
Reorganize src
fpotier Jul 23, 2025
b541d77
Reorganize src/test
fpotier Jul 23, 2025
06ac9ee
Remove builder
fpotier Jul 23, 2025
1e0ab35
Add md formatter to devcontainer
fpotier Jul 23, 2025
217782f
Start mapping documentation
fpotier Jul 23, 2025
0fb5c7f
Add spoless formatter
fpotier Jul 23, 2025
2117874
fix typo
fpotier Jul 23, 2025
ce299af
Datacite 1.
fpotier Jul 23, 2025
a7e0a8f
Datacite 2.
fpotier Jul 23, 2025
5d9770d
Datacite 3
fpotier Jul 23, 2025
59b7e3f
Datacite 4
fpotier Jul 23, 2025
c1c4c72
Add remaining properties
fpotier Jul 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "Java",
"image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",
"runArgs": [ "--network=host" ],
"updateRemoteUserUID": true,
"mounts": [
{
"source": "devcontainer-maven-cache-${containerWorkspaceFolderBasename}",
"target": "/home/vscode/.m2",
"type": "volume"
}
],
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "21",
"installMaven": "true",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": { },
"ghcr.io/devcontainers-extra/features/quarkus-sdkman:2": {
"jdkVersion": "21"
},
"ghcr.io/devcontainers-extra/features/pre-commit:2": { }
},
"customizations": {
"vscode": {
"extensions": [
"redhat.vscode-xml",
"redhat.vscode-quarkus",
"darkriszty.markdown-table-prettify"
]
}
},
"postCreateCommand": "sudo -E chown -R $(id -u):$(id -g) ~/.m2",
"onCreateCommand": {
"install pre-commit hooks": "cd ${containerWorkspaceFolder} && pre-commit install"
}
}
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*
!target/quarkus-app/*
14 changes: 14 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: daily
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: daily
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: daily
98 changes: 98 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: CI

on:
push:
branches: main
pull_request:
branches: main

env:
devImage: ghcr.io/${{ github.repository }}-devcontainer

jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
rebuildDevContainer: ${{ steps.check_changes.outputs.devcontainer_any_changed }}
lintWorkflows: ${{ steps.check_changes.outputs.workflow_any_changed }}
runTests: ${{ steps.check_changes.outputs.src_any_changed }}
steps:
- uses: actions/checkout@v4
- name: Check for changes in .devcontainer
id: check_changes
uses: tj-actions/changed-files@v46
with:
files: |
devcontainer:
- .devcontainer/**
workflow:
- .github/**
src:
- src/**
- pom.xml

build:
runs-on: ubuntu-latest
needs: check_changes
if: needs.check_changes.outputs.rebuildDevContainer == 'true'
steps:
- uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and run Dev Container task
uses: devcontainers/ci@v0.3
with:
imageName: ${{ env.devImage }}
cacheFrom: ${{ env.devImage }}
push: always

unit_tests:
name: Unit tests
needs:
- build
- check_changes
if: needs.check_changes.outputs.runTests == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Test
uses: devcontainers/ci@v0.3
with:
push: never
imageName: ${{ env.devImage }}
cacheFrom: ${{ env.devImage }}
runCmd: ./mvnw test

actionlint:
runs-on: ubuntu-latest
needs: check_changes
if: needs.check_changes.outputs.lintWorkflows == 'true'
steps:
- uses: actions/checkout@v4
- name: Lint workflow files
uses: docker://rhysd/actionlint:latest
with:
args: -color


precommit:
name: pre-commit
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Test
uses: devcontainers/ci@v0.3
with:
push: never
imageName: ${{ env.devImage }}
cacheFrom: ${{ env.devImage }}
runCmd: pre-commit run --all-files
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- '*'

env:
devImage: ghcr.io/${{ github.repository }}-devcontainer

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Get POM project version
run: echo "POM_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout)" >> "$GITHUB_ENV"
- name: Compare tag and POM version
run: |
if [ "${{ github.ref }}" != "refs/tags/${{ env.POM_VERSION }}" ]; then
echo "Error: Tag '${{ github.ref }}' does not match POM project version '${{ env.POM_VERSION }}'."
exit 1
fi
- name: Build and push image
uses: devcontainers/ci@v0.3
with:
imageName: ${{ env.devImage }}
cacheFrom: ${{ env.devImage }}
push: never
runCmd: >
./mvnw install
-Dquarkus.container-image.push=true
-Dquarkus.container-image.username=${{ github.actor }}
-Dquarkus.container-image.username=${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
.flattened-pom.xml

# Eclipse
.project
.classpath
.settings/
bin/

# IntelliJ
.idea
*.ipr
*.iml
*.iws

# NetBeans
nb-configuration.xml

# Visual Studio Code
.vscode
.factorypath

# OSX
.DS_Store

# Vim
*.swp
*.swo

# patch
*.orig
*.rej

# Local environment
.env
.jbang

# Plugin directory
.quarkus/cli/plugins/
# TLS Certificates
.certs/
1 change: 1 addition & 0 deletions .mvn/wrapper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
maven-wrapper.jar
93 changes: 93 additions & 0 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import java.io.IOException;
import java.io.InputStream;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.concurrent.ThreadLocalRandom;

public final class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "3.3.2";

private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));

public static void main(String[] args) {
log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION);

if (args.length != 2) {
System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing");
System.exit(1);
}

try {
log(" - Downloader started");
final URL wrapperUrl = URI.create(args[0]).toURL();
final String jarPath = args[1].replace("..", ""); // Sanitize path
final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize();
downloadFileFromURL(wrapperUrl, wrapperJarPath);
log("Done");
} catch (IOException e) {
System.err.println("- Error downloading: " + e.getMessage());
if (VERBOSE) {
e.printStackTrace();
}
System.exit(1);
}
}

private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath)
throws IOException {
log(" - Downloading to: " + wrapperJarPath);
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
final String username = System.getenv("MVNW_USERNAME");
final char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
Path temp = wrapperJarPath
.getParent()
.resolve(wrapperJarPath.getFileName() + "."
+ Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp");
try (InputStream inStream = wrapperUrl.openStream()) {
Files.copy(inStream, temp, StandardCopyOption.REPLACE_EXISTING);
Files.move(temp, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING);
} finally {
Files.deleteIfExists(temp);
}
log(" - Downloader complete");
}

private static void log(String msg) {
if (VERBOSE) {
System.out.println(msg);
}
}

}
20 changes: 20 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=source
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-xml
- id: check-added-large-files
- repo: local
hooks:
- id: check_format
name: Check Java source file format
language: system
entry: ./mvnw spotless:check
pass_filenames: false
Loading