Skip to content
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

editoast: use default value for missing SignalSncfExtension::side #7720

Merged

Conversation

emersion
Copy link
Member

The JSON Schema has this field marked as optional. Instead of rejecting requests which don't include the field, fill the field with the default value.

This still isn't enough to fix the original bug, because the form doesn't reflect the correct default (shows "LEFT" instead of "CENTER" initially, even if the field is undefined). But I believe it's still worth fixing editoast.

References: #7445

@emersion emersion requested review from flomonster and hamz2a June 14, 2024 09:33
@emersion emersion requested a review from a team as a code owner June 14, 2024 09:33
@flomonster
Copy link
Contributor

You have to regenerate the openapi using editoast openapi > openapi.yaml and then the rtk files ./scripts/generate-types.sh

@emersion emersion requested review from woshilapin and removed request for hamz2a June 14, 2024 13:14
@emersion emersion force-pushed the emersion/signal-api-default branch from 82eac83 to 4f12b8d Compare June 14, 2024 13:24
@emersion
Copy link
Member Author

Indeed, done!

The JSON Schema has this field marked as optional. Instead of
rejecting requests which don't include the field, fill the field
with the default value.

This still isn't enough to fix the original bug, because the form
doesn't reflect the correct default (shows "LEFT" instead of
"CENTER" initially, even if the field is undefined). But I believe
it's still worth fixing editoast.

References: OpenRailAssociation#7445
@emersion emersion force-pushed the emersion/signal-api-default branch from 4f12b8d to 3f4112e Compare June 19, 2024 07:54
@emersion emersion enabled auto-merge June 19, 2024 07:54
@emersion emersion added this pull request to the merge queue Jun 19, 2024
Merged via the queue into OpenRailAssociation:dev with commit 0324171 Jun 19, 2024
17 checks passed
@emersion emersion deleted the emersion/signal-api-default branch June 19, 2024 08:38
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