ovh / manager

OVHcloud Control Panel
https://ovh.github.io/manager/
BSD 3-Clause "New" or "Revised" License
214 stars 98 forks source link

[manager] share order catalog typings #13847

Open tristanwagner opened 2 weeks ago

tristanwagner commented 2 weeks ago

Have you already contact our help centre?

Describe the problem

I need to use the order catalog for a specific product, I can see that all the typing of the API response has already been done in another project, I think it might be useful to share these types across projects.

Here is the API route I'm talking about GET /order/catalog/public/{productName}

This could be applied to all API typing for routes that are commonly used across multiple projects.

Describe the solution

Here is the file that I could reuse for Order Catalog typing.

While this typing is very well made, I would like to add a nitpick on the enums, to me the enum content should always be uppercased like this

  // no
  export enum TestEnum {
   'something' = 'something',
  }

  // yes
  export enum TestEnum {
   SOMETHING = 'something',
  }

Describe alternatives you've considered

No response

Additional context

No response

tristanwagner commented 2 weeks ago

as discussed it would be nice to have all public apis typings available in manager-core-api, and it might be possible to generate them automatically from some swagger files