generated from finos-labs/project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 51
Add support for flows inside pattern using const to a url reference + confirm generated arch document renders flow in docify #1374
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
Open
LeighFinegold
wants to merge
1
commit into
finos:main
Choose a base branch
from
LeighFinegold:1369
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "https://calm.finos.org/release/1.0-rc1/meta/flow.json", | ||
"$id": "https://calm.finos.org/workshop/flow/conference-signup.flow.json", | ||
"unique-id": "flow-conference-signup", | ||
"name": "Conference Signup Flow", | ||
"description": "Flow for registering a user through the conference website and storing their details in the attendee database.", | ||
"transitions": [ | ||
{ | ||
"relationship-unique-id": "conference-website-load-balancer", | ||
"sequence-number": 1, | ||
"summary": "User submits sign-up form via Conference Website to Load Balancer" | ||
}, | ||
{ | ||
"relationship-unique-id": "load-balancer-attendees", | ||
"sequence-number": 2, | ||
"summary": "Load Balancer forwards request to Attendees Service" | ||
}, | ||
{ | ||
"relationship-unique-id": "attendees-attendees-store", | ||
"sequence-number": 3, | ||
"summary": "Attendees Service stores attendee info in the Attendees Store" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ const INPUT_DIR = join( | |
); | ||
const WORKSHOP_DIR = join( | ||
__dirname, | ||
'../../../calm/workshop/controls' | ||
'../../../calm/workshop' | ||
); | ||
|
||
const OUTPUT_DIR = join(__dirname, '../../test_fixtures/docify/workshop/actual-output'); | ||
|
@@ -26,15 +26,22 @@ describe('Docifier E2E - Real Model and Template', () => { | |
|
||
it('generates documentation from the conference-signup.arch.json model', async () => { | ||
|
||
const docifier = new Docifier('WEBSITE', join(INPUT_DIR, 'conference-signup.arch.json'), NON_SECURE_VERSION_DOC_WEBSITE, new Map<string,string>()); | ||
//TODO: This test needs manual mapping until flows folder is republished. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If folks are happy with this PR, then recommend we first just publish the new flows document to S3 and then this will not be needed |
||
const mapping = new Map<string, string>([ | ||
['https://calm.finos.org/workshop/flows/conference-signup.flow.json', join(WORKSHOP_DIR, 'flows/conference-signup.flow.json')], | ||
]); | ||
|
||
|
||
const docifier = new Docifier('WEBSITE', join(INPUT_DIR, 'conference-signup.arch.json'), NON_SECURE_VERSION_DOC_WEBSITE, mapping); | ||
await docifier.docify(); | ||
await expectDirectoryMatch(join(EXPECTED_OUTPUT_DIR,'non-secure'),join(OUTPUT_DIR,'non-secure')); | ||
|
||
}); | ||
|
||
it('generates documentation from the conference-secure-signup.arch.json model with explicit local mapping', async () => { | ||
const mapping = new Map<string, string>([ | ||
['https://calm.finos.org/workshop/controls/micro-segmentation.config.json', join(WORKSHOP_DIR, 'micro-segmentation.config.json')], | ||
['https://calm.finos.org/workshop/controls/micro-segmentation.config.json', join(WORKSHOP_DIR, 'controls/micro-segmentation.config.json')], | ||
['https://calm.finos.org/workshop/flows/conference-signup.flow.json', join(WORKSHOP_DIR, 'flows/conference-signup.flow.json')], | ||
]); | ||
|
||
const docifier = new Docifier('WEBSITE', join(INPUT_DIR, 'conference-secure-signup-amended.arch.json'), SECURE_VERSION_DOC_WEBSITE, mapping); | ||
|
@@ -45,7 +52,13 @@ describe('Docifier E2E - Real Model and Template', () => { | |
}); | ||
|
||
it('generates documentation from the conference-secure-signup.arch.json model with no mapping as workshop documents are available', async () => { | ||
const docifier = new Docifier('WEBSITE', join(INPUT_DIR, 'conference-secure-signup-amended.arch.json'), SECURE_VERSION_DOC_WEBSITE, new Map<string,string>()); | ||
|
||
//TODO: This test needs manual mapping until flows folder is republished. | ||
const mapping = new Map<string, string>([ | ||
['https://calm.finos.org/workshop/flows/conference-signup.flow.json', join(WORKSHOP_DIR, 'flows/conference-signup.flow.json')], | ||
]); | ||
|
||
const docifier = new Docifier('WEBSITE', join(INPUT_DIR, 'conference-secure-signup-amended.arch.json'), SECURE_VERSION_DOC_WEBSITE, mapping); | ||
await docifier.docify(); | ||
await expectDirectoryMatch(join(EXPECTED_OUTPUT_DIR,'secure'),join(OUTPUT_DIR,'secure')); | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...res/docify/workshop/expected-output/secure/docs/flows/flow-conference-signup.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
id: flow-conference-signup | ||
title: Conference Signup Flow | ||
--- | ||
|
||
## Details | ||
<div className="table-container"> | ||
| Field | Value | | ||
|---------------------|--------------------------| | ||
| **Unique ID** | flow-conference-signup | | ||
| **Name** | Conference Signup Flow | | ||
| **Description** | Flow for registering a user through the conference website and storing their details in the attendee database. | | ||
</div> | ||
|
||
## Sequence Diagram | ||
```mermaid | ||
sequenceDiagram | ||
Conference Website ->> Load Balancer: User submits sign-up form via Conference Website to Load Balancer | ||
Load Balancer ->> Attendees Service: Load Balancer forwards request to Attendees Service | ||
Attendees Service ->> Attendees Store: Attendees Service stores attendee info in the Attendees Store | ||
``` | ||
## Controls | ||
_No controls defined._ | ||
|
||
## Metadata | ||
_No Metadata defined._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing
over
Allows support for
{ const: null }