Skip to content

Feat/add import consumes#124

Open
eskenazit wants to merge 7 commits intomainfrom
feat/add-import-consumes
Open

Feat/add import consumes#124
eskenazit wants to merge 7 commits intomainfrom
feat/add-import-consumes

Conversation

@eskenazit
Copy link
Contributor

added consumes import support and made some chore cleaning

@eskenazit eskenazit removed the request for review from farah-t-trigui March 11, 2026 17:27
jlouvel added 3 commits March 11, 2026 15:30
Eventually we could add HTTP resources at this level but HTTP operations doesn't look useful
 - add import model and resolver to load consumes adapters from external files
 - resolve imported consumes entries during capability initialization
 - support standalone root-level consumes documents in spec model
 - add custom consumes deserialization for inline vs imported entries
 - add unit and integration tests for deserialization, resolver behavior, aliases, and error cases
 - add tutorial step 7 example for consumes import and shared consumes file
 - update tutorial schema headers to use unified Naftiko schema
@jlouvel
Copy link
Contributor

jlouvel commented Mar 11, 2026

@eskenazit I've added the implementation to this PR to streamline the review process. I have only left out the "operations" surcharge feature for now.

inputParameters:
- name: "name"
in: "query"
value: "${name}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure there should be a value here since the parameter is in the query. Plus syntax is not mustache ^^'

outputParameters:
- name: "message"
type: "string"
value: "$.message"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing mustache templating

name: "${name}"
outputParameters:
- type: "string"
mapping: "$.message"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either missing parameter name or wrong type

// Should not throw
resolver.resolveImports(null, tempDir.toString());
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a test with a import namespace collision to ensure there is a detection and proper error management ?

@eskenazit
Copy link
Contributor Author

@jlouvel since this is my own PR, I cannot approve or request for changes for your submissions. Let us discuss this in the retrospective to have a proper process in this case =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants