Skip to content

Commit

Permalink
Merge branch 'main' into interface-spectral-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgough-ms authored Apr 8, 2024
2 parents 689e636 + d380be8 commit 8df34d7
Show file tree
Hide file tree
Showing 8 changed files with 313 additions and 180 deletions.
135 changes: 86 additions & 49 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions translator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ The OpenAPI Specification is available at </v3/api-docs> (<http://localhost:8080

## Supported translations

| Format | Endpoint | Description |
|----------------|---------------|-------------------------------------------------------------------------------------------------------------------|
| Structurizr-C4 | /translate/c4 | Produces a Workspace json object with generated default views that can be imported into <https://structurizr.com> |
| Format | Endpoint | Description |
|----------------|---------------|--------------------------------------------------------------------------------------------------------------------|
| Structurizr-C4 | /translate/c4 | Produces a Workspace json object with generated default views that can be imported into <https://structurizr.com/> |
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.finos.calmtranslator.controller;

import com.structurizr.Workspace;
import com.structurizr.util.WorkspaceUtils;
import org.finos.calmtranslator.calm.Core;
import org.finos.calmtranslator.translators.C4ModelTranslator;

Expand All @@ -24,12 +23,7 @@ public Translator(C4ModelTranslator c4ModelTranslator) {

@PostMapping("/c4")
@ResponseStatus(HttpStatus.CREATED)
public String c4Translation(
@RequestBody Core calmModel

) throws Exception {
// Currently a Structurizr json format
final Workspace workspace = c4ModelTranslator.translate(calmModel);
return WorkspaceUtils.toJson(workspace, true);
public Workspace c4Translation(@RequestBody Core calmModel) {
return c4ModelTranslator.translate(calmModel);
}
}
Loading

0 comments on commit 8df34d7

Please sign in to comment.