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

[API Explorer] Fields shown but ignored #1470

Closed
virkt25 opened this issue Jun 25, 2018 · 6 comments
Closed

[API Explorer] Fields shown but ignored #1470

virkt25 opened this issue Jun 25, 2018 · 6 comments
Labels
developer-experience Issues affecting ease of use and overall experience of LB users feature needs grooming

Comments

@virkt25
Copy link
Contributor

virkt25 commented Jun 25, 2018

Description / Steps to reproduce / Feature proposal

From #1206

For examples/todo, in the API Explorer, clicking on the Try it Out shows id (with a default value of 0) as an option for all requests but the field is ignored by some calls such as POST for creating a new id. Remove this field from the API explorer for calls that do not honour it.

Current Behavior

  • id field is shown for all requests and ignored by some of the REST calls.

Expected Behavior

  • id field and others only show in API Explorer for REST calls that will honour the Call.

See Reporting Issues for more tips on writing good issues

@bajtos
Copy link
Member

bajtos commented Jul 30, 2018

This is tricky to address, it requires us to emit different OpenAPI schema for different REST endpoints - see #1179.

@bajtos bajtos added developer-experience Issues affecting ease of use and overall experience of LB users LB4 GA feature labels Jul 30, 2018
@jannyHou jannyHou changed the title [API Explorer] Fields shown but ignored [Docs] [API Explorer] Fields shown but ignored Sep 6, 2018
@jannyHou jannyHou changed the title [Docs] [API Explorer] Fields shown but ignored [API Explorer] Fields shown but ignored Sep 6, 2018
@jannyHou
Copy link
Contributor

jannyHou commented Sep 6, 2018

Let's open a new issue to discuss the following points:

  • Figure out how to describe the excluded properties as partial of the model.
  • How to map the partial model to Openapi schema.

@dhmlau dhmlau added post-GA and removed LB4 GA labels Sep 6, 2018
@dhmlau
Copy link
Member

dhmlau commented Sep 6, 2018

Discussed with @raymondfeng , both this task and the spike task that @jannyHou is going to create will be postGA. @jannyHou , please mark the new ticket as postGA. thanks.

@FabienCH
Copy link

Hello,

I have a similar issue, I don't know if it's related or not, that is why I haven't open a new issue yet.

I followed the Todo tutorial and generated the CRUD controller with the cli. In the API Explorer, when I try the GET /todos request and enter { "where": {"id": "1"} } in the filter and click execute, it is ignored. It doesn't appear in the request URL and results are not filtered.

There is the same issue with the fields filter.

@bajtos
Copy link
Member

bajtos commented Oct 15, 2018

I followed the Todo tutorial and generated the CRUD controller with the cli. In the API Explorer, when I try the GET /todos request and enter { "where": {"id": "1"} } in the filter and click execute, it is ignored. It doesn't appear in the request URL and results are not filtered.

This is a limitation of API Explorer and the OpenAPI spec in general :(

Please refer to the discussion in #1679 for more details, see also swagger-api/swagger-js#1385

@nabdelgadir
Copy link
Contributor

Now that #3297 is landed, the id property is excluded when making a POST request and developers have the option to exclude other properties as they see fit. Closing this issue as done.

@nabdelgadir nabdelgadir added this to the July 2019 milestone milestone Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Issues affecting ease of use and overall experience of LB users feature needs grooming
Projects
None yet
Development

No branches or pull requests

6 participants