Laevitas / laevitas-feature-issue-tracker

3 stars 0 forks source link

Duplicate Method Name in API #9

Closed joemccann closed 1 year ago

joemccann commented 1 year ago

After running a simple scan of all the API endpoints (using catalog) there's still a duplicate method name for two endopints:

The following API method names are duplicated:
[
  {
    description: 'Retrieve Historical Futures Open Interest Weighted Basis for a Specific Currency',
    methodName: 'getFuturesOIWeightedFunding',
    path: '/historical/futures/oi_weighted_basis/{currency}',
    format: 'JSON',
    query_params: {
      start: [Array],
      end: [Array],
      limit: [Array],
      page: [Array],
      granularity: []
    },
    path_params: { currency: [Array] }
  },
  {
    description: 'Retrieve Historical Futures Open Interest Weighted Funding for a Specific Currency',
    methodName: 'getFuturesOIWeightedFunding',
    path: '/historical/futures/oi_weighted_funding/{currency}',
    format: 'JSON',
    query_params: {
      start: [Array],
      end: [Array],
      limit: [Array],
      page: [Array],
      granularity: []
    },
    path_params: { currency: [Array] }
  }
]

I highly recommend running some basic smoke tests against the API to ensure the following:

  1. Test to ensure every item returned in the api_list array has a value for every field, meaning description, methodName, path, format are not null or empty strings since this are all required fields.

  2. Test to ensure every item returned in the api_list does not have a duplicate value for any of the required fields with the exception of format. So description, methodName, path should all be unique and not duplicates.

By running these tests, you will not introduce or re-introduce any bugs.

MoetezL commented 1 year ago

Thank you for your feedback and recommendations. I apologize for any inconvenience caused. I will integrate tests as you suggested to ensure the API's stability and prevent potential bugs

MoetezL commented 1 year ago

hello @joemccann , Regarding issue #9, we've added a test to ensure unique description, methodName, and path. Required fields are now checked for emptiness too. Thanks!