InseeFrLab / InseeFrLab/onyxia

Add x-onyxia instruction: `oneAmong`

Open
#1,081 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
872
Forks
109
Avg merge
6d 3h
Merged PRs (30d)
1

Description

The idea is to let chart authors say "this must be filled up with one object among a given array of the XOnyxia context".

```yaml
- relativePath: ide/s3-single.json
content: |
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"profileName": {
"type": "string",
"x-onyxia": {
"overwriteDefaultWith": "{{profileName}}"
}
},
"accessKeyId": {
"type": "string",
"x-onyxia": {
"overwriteDefaultWith": "{{AWS_ACCESS_KEY_ID}}"
}
},
"secretAccessKey": {
"type": "string",
"x-onyxia": {
"overwriteDefaultWith": "{{AWS_SECRET_ACCESS_KEY}}"
}
}
},
"x-onyxia": {
"oneAmong": {
options: "{{s3_array}}",
defaultOption: "index===0"
// OR defaultOption: "{{profileName}}==='default'"
// OR defaultOption: null
}
}
```

`XOnyxia`
```json
{
// ...
"s3_array": [
{
"profileName": "default",
"AWS_ACCESS_KEY_ID": "aaa",
"AWS_SECRET_ACCESS_KEY": "bbb"
},
{
"profileName": "myprofile",
"AWS_ACCESS_KEY_ID": "ccc",
"AWS_SECRET_ACCESS_KEY": "ddd"
}
]
}
```

Image

Image

Image

Image

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files, entry points, or tests are named. Locate the code that interprets x-onyxia schema instructions and renders context-backed form values, then trace how expressions and defaults are handled; done means oneAmong accepts the proposed options and defaultOption forms and applies the selected object to the schema-driven form.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.