question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[API review] Auto-gen code for file

See original GitHub issue
  • Rename FileHTTPHeader -> FileHttpHeaders

  • In FileHTTPHeader, the API has pattern of getFile*(), however, in FileProperties, it is get*(), do we want to align those? Drop the File from getter and setter?

  • Is it necessary to name this as Ntfs to inform the user of the file system format? Can this just be FileAttributes?

  • Can user set the last modified time? Isn’t it set in the service when the user updates something? ShareProperties

  • In Range, since end is optional, should this return Long instead of long?

  • FileProperty is not used anywhere and we have a hand craft FileProperties. Do we still need the FileProperty?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sima-zhucommented, Oct 15, 2019

Regarding: FileProperty is not used anywhere and we have a hand craft FileProperties. Do we still need the FileProperty?

The response body of API to “List files and directories” includes an array describing each file, such a description contains two fields - file name and size of the file. The “FileProperty” is defined in swagger to hold this“file size”, I believe it’s designed in this way to accommodate more properties in future (e.g. last modified time of file).

The “FileProperties” is something we wrote in our convenience layer to represents result of - Get File property API, service returns properties through headers and in convince layer we move them in this model.

So, FileProperty and FileProperties are different. We cannot remove any one of them.

Update Oct/15: This is NOP, see above comments.

1reaction
sima-zhucommented, Oct 15, 2019

Regarding: In Range, since end is optional, should this return Long instead of long?

In request, service allows us to put null value for FileRange::end property. Refer Rest API doc. In response, service always return the end of the range. It is required field.

So we’d better to leave as it is.

Update Oct/15: This is NOP, see above comments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Automatically Generate Clients for your REST API
Fortunately, with the power of Microsoft's AutoRest code generator, we can automatically generate client code for almost every popular language ...
Read more >
REST API Client Code Generator - Visual Studio Marketplace
AutoRestCodeGenerator - Generates a single file C# REST API Client ... The custom tool code generators piggy back on top of well known...
Read more >
8 open-source tools that will lift your API game | TechBeacon
1. OpenAPI generator ... This comprehensive client generator is one of the most community-supported open-source libraries for leveraging an OAS file. With support ......
Read more >
rustamkulenov/autogen: Generates files from template and ...
Autogen iterates through contexts within context file and renders output files from template. Output file will have a name specified in 'fileName' key...
Read more >
Overview of the problems automatic code generation can solve
Code generation can automate API development in one system to match another, Bartlett said. For example, it's often simpler to use a code ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found