sendgrid-oai icon indicating copy to clipboard operation
sendgrid-oai copied to clipboard

OAS specification has multiple errors

Open tthesb opened this issue 3 years ago • 1 comments

Issue Summary

I'm not able to generate a REST client from your public available oas file found on github https://github.com/sendgrid/sendgrid-oai/blob/main/oai.json

Do you have a working copy available somewhere?

Steps to Reproduce

  1. Download the specification: https://github.com/sendgrid/sendgrid-oai/blob/main/oai.json
  2. Run Autorest --input-file=oai.json --output-folder=Output --csharp --namespace=My.Backend.Services

Code Snippet

Autorest --input-file=oai.json --output-folder=Output --csharp --namespace=My.Backend.Services

Exception/Log

ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /messages/{msg_id} > get > responses > 400)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:25352:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /contactdb/recipients/search > post > responses > 200)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:19977:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /contactdb/recipients/search > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:19920:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /marketing/contacts/search/emails > post > responses > 200)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:13599:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /marketing/contacts/imports > put > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:13246:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /marketing/contacts/search > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:13131:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /whitelabel/dns/email > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:8989:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /whitelabel/links/{id}/validate > post > responses > 200)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:7583:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /alerts > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:4930:5
ERROR: Schema violation: String is too short (0 chars), minimum 1 (info > version)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:4:2
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /messages/{msg_id} > get > responses > 400)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:25352:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /contactdb/recipients/search > post > responses > 200)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:19977:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /contactdb/recipients/search > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:19920:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /marketing/contacts/search/emails > post > responses > 200)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:13599:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /marketing/contacts/imports > put > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:13246:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /marketing/contacts/search > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:13131:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /whitelabel/dns/email > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:8989:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /whitelabel/links/{id}/validate > post > responses > 200)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:7583:5
ERROR: Schema violation: Data does not match any schemas from 'oneOf' (paths > /alerts > post > parameters > 0)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:4930:5
ERROR: Schema violation: String is too short (0 chars), minimum 1 (info > version)
    - file:///C:/Users/trt/Downloads/SendGrid/oai.json:4:2
Process() cancelled due to failure

Technical details:

  • sendgrid-oai version: 1.6.0
  • open version: ?

tthesb avatar Sep 01 '21 08:09 tthesb

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

JenniferMah avatar Sep 10 '21 23:09 JenniferMah