Skip to content

Conversation

@shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket: -

Changes included:

We've decided to go with the Params suffix in our specs after #96, but some of the parameters were still using other wording. It's not mandatory to use the Params suffix, but it should be the go-to when the name conflict with the operationId.

🧪 Test

CI :D

@shortcuts shortcuts changed the title fix(specs): name conflict with method and params fix(spec): name conflict with method and params Feb 7, 2022
Copy link
Contributor

@damcou damcou left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

function batchDictionaryEntries({
dictionaryName,
batchDictionaryEntries,
batchDictionaryEntriesParams,
Copy link
Contributor

Choose a reason for hiding this comment

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

I might be too late for this discussion, but I'm wondering if we cannot have flattened parameters like:

dictionaryName: 'compounds' | 'plurals' | 'stopwords'; clearExistingDictionaryEntries?: boolean; requests: BatchDictionaryEntriesRequest[];

It's weird to have a nested parameter for whatever benefit I cannot see 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

The goal of wrapping parameters in an object is to have a single parameter when calling the method. It would indeed improve the DX to flatten this object but adds a lot of complexity to our templates (might be worth doing a small POC, I'll take a closer look this week).

This is definitely an open discussion as we're still in closed beta, any improvements are welcome!

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure! Let's keep it at the back of our brains :)

@shortcuts shortcuts changed the title fix(spec): name conflict with method and params fix(spec): name conflict between method and params Feb 7, 2022
@shortcuts shortcuts merged commit 6a5f338 into main Feb 7, 2022
@shortcuts shortcuts deleted the fix/specs-name-conflict branch February 7, 2022 13:59
@shortcuts shortcuts self-assigned this Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants