Skip to content
Snippets Groups Projects
Verified Commit d2b3545f authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: more info on profiles

parent 6a9b86db
Branches
No related tags found
No related merge requests found
Pipeline #48790 failed
......@@ -4,7 +4,7 @@
<parent>
<groupId>com.indiscale.fdo</groupId>
<artifactId>fdo-manager-service</artifactId>
<version>0.1.0-rc2</version>
<version>0.1.0-rc3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
......
......@@ -357,6 +357,13 @@ components:
properties:
id:
$ref: '#/components/schemas/ProfileID'
attributes:
type: object
properties:
name:
object: string
description:
object: string
links:
$ref: '#/components/schemas/Links'
Hello:
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>com.indiscale.fdo</groupId>
<artifactId>fdo-manager-service</artifactId>
<version>0.1.0-rc2</version>
<version>0.1.0-rc3</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -7,6 +7,7 @@ import com.indiscale.fdo.manager.service.api.model.GetProfile200Response;
import com.indiscale.fdo.manager.service.api.model.Links;
import com.indiscale.fdo.manager.service.api.model.ListProfiles200Response;
import com.indiscale.fdo.manager.service.api.model.Profile;
import com.indiscale.fdo.manager.service.api.model.ProfileAttributes;
import com.indiscale.fdo.manager.service.api.operation.ProfilesApi;
import java.util.List;
import org.springframework.http.ResponseEntity;
......@@ -18,7 +19,10 @@ import org.springframework.web.bind.annotation.RestController;
public class ProfilesApiImpl extends BaseController implements ProfilesApi {
private Profile toProfile(FdoProfile p) {
return new Profile().id(p.getId());
ProfileAttributes attr = new ProfileAttributes();
attr.description(p.getDescription());
attr.name(p.getName());
return new Profile().id(p.getId()).attributes(attr);
}
@Override
......
......@@ -55,9 +55,9 @@ public class MockManager extends DefaultManager {
e.printStackTrace();
}
DefaultProfileRegistry<FdoProfile> profileRegistry = getProfileRegistry();
profileRegistry.registerProfile(createFdoProfile("mock-profile-1"));
profileRegistry.registerProfile(createFdoProfile("0.prefix/mock-profile-1"));
try {
setDefaultProfile("mock-profile-1");
setDefaultProfile("0.prefix/mock-profile-1");
} catch (UnknownProfileException e) {
e.printStackTrace();
}
......@@ -75,6 +75,16 @@ public class MockManager extends DefaultManager {
public String getId() {
return id;
}
@Override
public String getDescription() {
return "Mock-Profile Description";
}
@Override
public String getName() {
return "Mock-Profile";
}
};
}
......
......@@ -9,7 +9,7 @@
<groupId>com.indiscale.fdo</groupId>
<artifactId>fdo-manager-service</artifactId>
<packaging>pom</packaging>
<version>0.1.0-rc2</version>
<version>0.1.0-rc3</version>
<modules>
<module>api</module>
<module>application</module>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment