Skip to content

Feat/add import consumes#124

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

Feat/add import consumes#124
eskenazit wants to merge 28 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 ^^'

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

This is broken indeed, fixed. This was a draft tutorial proposal that got generated. Feel free with @jeremnaf to take over and reset to something better

// 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 =)

jlouvel added 4 commits March 12, 2026 08:50
 - 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
Copy link
Contributor

@jlouvel jlouvel left a comment

Choose a reason for hiding this comment

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

@eskenazit Argh, I didn't anticipate that.. I have rebased and fixed issues. Should I approve?

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

Choose a reason for hiding this comment

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

fixed

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

Choose a reason for hiding this comment

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

This is broken indeed, fixed. This was a draft tutorial proposal that got generated. Feel free with @jeremnaf to take over and reset to something better

@jlouvel jlouvel requested review from jeremnaf and jlouvel March 12, 2026 13:02
jlouvel
jlouvel previously approved these changes Mar 12, 2026
Copy link
Contributor

@jlouvel jlouvel left a comment

Choose a reason for hiding this comment

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

LGTM

@eskenazit eskenazit dismissed jlouvel’s stale review March 12, 2026 14:08

The merge-base changed after approval.

@jeremnaf
Copy link
Contributor

Do you want me to approve and merge this PR @eskenazit @jlouvel ?

@eskenazit
Copy link
Contributor Author

@jeremnaf when it's ready yes, but it is not yet ^^'

Copy link
Contributor Author

@eskenazit eskenazit left a comment

Choose a reason for hiding this comment

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

@jlouvel still a few things to fix

with:
name: "Scott"
outputParameters:
- type: "string"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jlouve Either missing a name or wrong type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jlouvel this whole yml seems very suspicous (no ", strange templating). Was is tested ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@eskenazit as I mentioned earlier this is a draft to bootstrap this upcoming step, but there is no "https://api.example.com" API live so it doesn't work. If this is counterproductive, I can just remove this. Let's not waste too much time on this

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see you are in the Skill adapter example. It is a fake example as well, refers to imaginary API. It is only formally valid and help illustrate. If this is counterproductive, we can remove

@jlouvel
Copy link
Contributor

jlouvel commented Mar 12, 2026

@eskenazit I've removed the tutorial step 7 and associated YAML file. This is delayed this PR and has little value at this point

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.

3 participants