This repository was archived by the owner on Jan 20, 2024. It is now read-only.
forked from OAI/OpenAPI-Specification
-
Notifications
You must be signed in to change notification settings - Fork 1
Merge directive #9
Open
petrochenko-pavel-a
wants to merge
10
commits into
mulesoft-labs:oas4_raml2
Choose a base branch
from
Pavel-research:merge-directive
base: oas4_raml2
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
Merge directive #9
petrochenko-pavel-a
wants to merge
10
commits into
mulesoft-labs:oas4_raml2
from
Pavel-research:merge-directive
Conversation
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
Adding array short cut
|
||
##### Restrictions on macro parameters | ||
|
||
Only strings, booleans and numbers are allowed. |
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.
Is this actually a requirement.
@@ -3364,6 +3444,107 @@ Two examples of this: | |||
1. The [Paths Object](#pathsObject) MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can't access any documentation. They'd still have access to the [Info Object](#infoObject) which may contain additional information regarding authentication. | |||
2. The [Path Item Object](#pathItemObject) MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the [Paths Object](#pathsObject), so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see. | |||
|
|||
### Merge directives |
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.
This way of dealing with templates breaks schema. But as for me viewing templates as a macros that should be expanded by preprocessor is probably simplest possible option.
1. take a macro definition referenced in `$ref` property and perform template substitution as defined later | ||
2. merge result of template substitution with a base object containing `$merge`key as defined in [Overlays/Extensions](https://github.com/mulesoft-labs/OpenAPI-Specification/pull/3/files#diff-d1455f6edb807e38d88298c2361ec1e3R3644) | ||
|
||
If value of `$merge` is an array perform merge operation for each of array members. (Every array member should be an object and must have a valid $ref and $arguments properties) |
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.
Reference resolution should be performed one more time after merge :-(
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.