dataplat / docs

The documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.
https://docs.dbatools.io
15 stars 12 forks source link

Website Commands documentation - Syntax layout #28

Closed davesbrown closed 5 years ago

davesbrown commented 5 years ago

name: Feature request/idea :bomb: about: Suggest a new feature or enhancement

I think the layout of the Syntax parameters list on the website commands documenation might be easier to read and find parameters if it was formatted similar to how MS Docs has their Powershell Cmdlet documentation. Example from SqlServer Module:

https://docs.microsoft.com/en-us/powershell/module/sqlserver/Add-RoleMember?view=sqlserver-ps


Summary of new feature

Proposed technical details (if applicable)

Latest version of dbatools as of writing

potatoqualitee commented 5 years ago

thank you for the request! I have transferred it to the docs repo and will ask @niphlod to take a look

wsmelton commented 5 years ago

The problem is that the modules from Microsoft have their documentation via the xml formatting. As well there is a whole underlying system behind the docs that Microsoft spent about a year development and building upon. We are simply generating the docs on the fly from the comment-based-help which does not lend well to trying to get pretty with the syntax and format.

The documentation for Microsoft takes the parameters and breaks them out based on the parameter sets as well, a large portion of our commands do not do that anymore (mainly because we don't like the use of it).

niphlod commented 5 years ago

maybe I can add a bit of regex to have the same layout, i.e. function -param1 -param2

etc etc I'll post here a few examples then we can decide

niphlod commented 5 years ago

few examples .... if you have in mind something that has a long/complicated syntax, post away

Copy-DbaDbTableData 
  [[-SqlInstance] <DbaInstanceParameter>] 
  [[-SqlCredential] <PSCredential>] 
  [[-Destination] <DbaInstanceParameter[]>] 
  [[-DestinationSqlCredential] <PSCredential>] 
  [[-Database] <String>] 
  [[-DestinationDatabase] <String>] 
  [[-Table] <String[]>] 
  [[-Query] <String>] 
  [-AutoCreateTable] 
  [[-BatchSize] <Int32>] 
  [[-NotifyAfter] <Int32>] 
  [[-DestinationTable] <String>] 
  [-NoTableLock] 
  [-CheckConstraints] 
  [-FireTriggers] 
  [-KeepIdentity] 
  [-KeepNulls] 
  [-Truncate] 
  [[-bulkCopyTimeOut] <Int32>] 
  [[-InputObject] <Table[]>] 
  [-EnableException] 
  [-WhatIf] 
  [-Confirm] [<CommonParameters>]

and

Backup-DbaDatabase 
  [-SqlCredential <PSCredential>] 
  [-Database <Object[]>] 
  [-ExcludeDatabase <Object[]>] 
  [-BackupDirectory <String[]>] 
  [-BackupFileName <String>] 
  [-ReplaceInName] 
  [-CopyOnly] 
  [-Type <String>] 
  [-CreateFolder] 
  [-FileCount <Int32>] 
  [-CompressBackup] 
  [-Checksum] 
  [-Verify] 
  [-MaxTransferSize <Int32>] 
  [-BlockSize <Int32>] 
  [-BufferCount <Int32>] 
  [-AzureBaseUrl <String>] 
  [-AzureCredential <String>] 
  [-NoRecovery] 
  [-BuildPath] 
  [-WithFormat] 
  [-Initialize] 
  [-SkipTapeHeader] 
  [-TimeStampFormat <String>] 
  [-IgnoreFileChecks] 
  [-OutputScriptOnly] 
  [-EnableException] 
  [-WhatIf] 
  [-Confirm] [<CommonParameters>]
niphlod commented 5 years ago

all on board ? @potatoqualitee , @wsmelton

potatoqualitee commented 5 years ago

thanks niph! ohhh i just realized, i'd respond far faster if we added d ocs to #dbatools-github, will do that