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

Add tests for simple Cadl model with properties of various types #388

Open
11 tasks
annelo-msft opened this issue Jun 21, 2022 · 1 comment
Open
11 tasks

Comments

@annelo-msft
Copy link
Member

annelo-msft commented Jun 21, 2022

@timotheeguerin shared instructions for adding Cadl tests here: https://github.com/Azure/autorest.testserver/wiki/Cadl-Scenario-Tests

This issue tracks the work to create a set of simple hello-world tests to support generating models with properties described in this issue:
Azure/autorest.csharp#2337 (comment), specifically:

  • String
    Note: Should include sub-types for C# like url and Etag (exact list TBD). CADL express this with “format” modifier like Swagger does.
  • bytes
  • Int32
  • Int64 (this format is highly discouraged by RestAPI board that prefers safeint/int53)
  • Safeint (int53)
  • Float32 (float in Swagger)
  • Float64 (double in Swagger)
  • zonedDateTime (a precise point in time with TZ)
    Note: RFC3339 if serialized in JSON or RFC2616 if serialized via a header.
  • boolean
  • array
  • map

These tests should cover the cases where the model is an:

  • Input model (only an input to a PUT operation)
  • Output model (only an output from a GET operation)
  • Input/output model (both an input to a PUT operation and an output from a GET operation)

So that languages that treat these differently can validate their scenarios for each, and their evolution story into input/output model.

@annelo-msft
Copy link
Member Author

@lmazuel, @mikekistler FYI

@annelo-msft annelo-msft changed the title Add test for simple Cadl input Add tests for simple Cadl model with properties of various types Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant