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

Bump core from 7452fe9 to afd3772 #246

Merged
merged 5 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
changeKind: internal
packages:
- "@azure-tools/typespec-client-generator-core"
---

3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ core/packages/compiler/templates/__snapshots__/
# Skip formatting tsp files

*.noformat.tsp

# Tm Grammars generated files
core/grammars/
2 changes: 1 addition & 1 deletion core
Submodule core updated 28 files
+3 −0 .changeset/docs-update-types-descriptions-2024-1-7-21-24-55.md
+6 −0 .chronus/changes/docs-update-types-descriptions-2024-1-9-0-53-22.md
+6 −0 .chronus/changes/fix-spellcheck-2024-1-8-23-16-15.md
+8 −0 .chronus/changes/tmlanguage-published-2024-1-9-1-17-15.md
+8 −0 .chronus/changes/watch-color-2024-1-8-23-15-57.md
+3 −0 .prettierignore
+0 −1 .vscode/settings.json
+15 −0 cspell.yaml
+8 −4 docs/language-basics/built-in-types.md
+1,271 −0 grammars/typespec.json
+1 −1 package.json
+2 −1 packages/compiler/lib/decorators.tsp
+0 −1 packages/compiler/lib/lib.tsp
+5 −4 packages/compiler/src/core/cli/actions/compile/compile.ts
+3 −3 packages/compiler/src/core/cli/actions/compile/watch.ts
+5 −0 packages/compiler/src/server/tmlanguage.ts
+1 −1 packages/http/lib/auth.tsp
+2 −2 packages/samples/specs/binary/binary.tsp
+1 −1 packages/samples/specs/documentation/docs.tsp
+1 −1 packages/samples/specs/encoded-names/encoded-names.tsp
+2 −2 packages/samples/specs/string-template/main.tsp
+2 −2 packages/samples/specs/testserver/body-complex/body-complex.tsp
+1 −0 packages/samples/specs/testserver/body-string/body-string.tsp
+2 −2 packages/samples/test/output/binary/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/documentation/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/encoded-names/@typespec/openapi3/openapi.yaml
+2 −2 packages/samples/test/output/testserver/body-complex/@typespec/openapi3/openapi.yaml
+2 −0 packages/website/src/css/custom.css
21 changes: 17 additions & 4 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ ignorePaths:
- "**/CHANGELOG.md"
- common/scripts/*
- packages/website/build/*
- pnpm-lock.yaml
- eng/feeds/**/examples/**
- packages/samples/test/output/**
useGitignore: true
enableFiletypes:
- cadl
- tsp
- typespec
words:
- allof
- apim
- apos
- armId
- azsdk
- Bazs
- byos
Expand All @@ -29,20 +35,27 @@ words:
- foos
- horiz
- Howtos
- infile
- kvset
- liftr
- logz
- LRO
- lropaging
- Lucene
- msazure
- msdata
- mylocation
- nupkg
- odata
- Onco
- oncophenotype
- PAYG
- prismjs
- qnas
- regionality
- Reranker
- rpaasoneboxacr
- rpass
- SERVICERP
- userrp
- lropaging
- armId
- tcgc
- userrp
4 changes: 2 additions & 2 deletions eng/scripts/new_service_adoption.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def pr_for_new_service(pr, files: list[dict]):
# Make sure there are at least 4 path segments
pattern = r'specification/[a-z-]+/(data-plane|resource-manager)/.*/.*'
filenames = [x['filename'] for x in files]
xfiles = [x for x in filenames if re.match(pattern, x) and 'common' not in x]
x_files = [x for x in filenames if re.match(pattern, x) and 'common' not in x]
# The namespace is the combined 3 path segments after "specification"
namespaces = list({'/'.join(x.split('/')[1:4]) for x in xfiles})
namespaces = list({'/'.join(x.split('/')[1:4]) for x in x_files})
for namespace in namespaces:
if non_public(namespace):
continue
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"check-version-mismatch": "syncpack list-mismatches",
"change": "chronus",
"clean": "pnpm run-all run clean",
"cspell": "cspell --no-progress \"**/*.{md,ts,tsx}\" ",
"cspell": "cspell --no-progress .",
"dogfood": "pnpm install && pnpm build && pnpm run-all dogfood",
"fix-version-mismatch": "syncpack fix-mismatches",
"format": "pnpm run prettier --write",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ enum AnalyzeResultOperationStatus {
notStarted,

@doc("Operation is running.")
runnning,
running,

@doc("Operation has failed.")
failed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,8 @@ interface Projects {
>;

#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "This operation does not follow the standard long-running operation pattern."
// NOTE: `import` is a reserved keyword
@doc("Triggers a job to export a project's data.")
importx is Operations.ResourceAction<
`import` is Operations.ResourceAction<
Project,
ExportedProject,
TypeSpec.Http.AcceptedResponse & Foundations.LongRunningStatusLocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import "@typespec/http";
import "@typespec/rest";
import "@typespec/openapi";

// cspell:ignore qnas

using TypeSpec.Http;
using TypeSpec.OpenAPI;

Expand Down Expand Up @@ -93,7 +95,7 @@ model MaxPageSizeParameter {
@extension("x-ms-parameter-location", "method")
@doc("The maximum number of resources to include in a single response")
@query
mazpagesize?: int32;
maxpagesize?: int32;
}

alias ListParameters = TopParameter & SkipParameter & MaxPageSizeParameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ interface Synonyms
interface Sources
extends ResourceUpdate<QnaSourceRecord, ODataError>,
ResourceList<QnaSourceRecord, ODataError> {
// TODO: Singlton Resource not represented correctly
// TODO: Singleton Resource not represented correctly
@get
@route("{projectName}/sources/jobs/{jobId}")
GetJob(...ResourceParameters<QnaSourceRecord>, ...JobIdParameter): JobState | ODataError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ namespace QuestionAnsweringProjects {
JobMetadata
>;

// TODO: ok resonse code is incorrect
@post
@doc("Update Active Learning feedback.")
@action("feedback")
Expand Down
6 changes: 4 additions & 2 deletions packages/samples/specs/data-plane/searchindex/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// ISSUE: Can't set service description: https://github.com/Azure/typespec-azure/issues/1032
// ISSUE: @extension on parameter doesn't work: https://github.com/Azure/typespec-azure/issues/1121

// cspell:ignore Viet

import "@typespec/http";
import "@typespec/rest";
import "@typespec/openapi";
Expand Down Expand Up @@ -37,7 +39,7 @@ enum AutocompleteMode {
@doc("Only one term is suggested. If the query has two terms, only the last term is completed. For example, if the input is 'washington medic', the suggested terms could include 'medicaid', 'medicare', and 'medicine'.")
OneTerm: "oneTerm",

@doc("Matching two-term phrases in the index will be suggested. For example, if the inpu.t is 'medic', the suggested terms could include 'medicare coverage' and 'medical assistant'.")
@doc("Matching two-term phrases in the index will be suggested. For example, if the input is 'medic', the suggested terms could include 'medicare coverage' and 'medical assistant'.")
TwoTerms: "twoTerms",

@doc("Completes the last term in a query with two or more terms, where the last two terms are a phrase that exists in the index. For example, if the input is 'washington medic', the suggested terms could include 'washington medicaid' and 'washington medical'.")
Expand Down Expand Up @@ -1041,7 +1043,7 @@ interface Documents {
}

// ISSUE: Can't respond with empty object: https://github.com/Azure/typespec-azure/issues/1122.
// They probably meant to have additonalProperties here? Surely this doesn't literally return `{}` always?
// They probably meant to have additionalProperties here? Surely this doesn't literally return `{}` always?
@tag("Documents")
@route("/docs('{key}')")
interface DocumentsByKey {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
namespace Azure.SearchService;

// cspell:ignore Bangla Bokmaal Bokmål Piqd Kiswahili Yucatec Otomi

@doc("The language codes supported for input text by KeyPhraseExtractionSkill.")
enum KeyPhraseExtractionSkillLanguage {
@doc("Danish") da,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using TypeSpec.Rest.Resource;
@tag("DataSources")
interface DatasourcesApis {
@route("/datasources")
@doc("Lists all indexe data sources available for a search service.")
@doc("Lists all indexes data sources available for a search service.")
@get
list(...SelectParameter, ...ClientRequestIdParameter, ...ApiVersionParameter): CollectionResult<
SearchIndexerDataSource,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "./searchservice.models.tsp";

// cspell:ignore Bangla Bokmaal Bokmål kstem Sorani Decompounder TFIDF

using TypeSpec.OpenAPI;
using TypeSpec.Rest;

Expand Down Expand Up @@ -628,7 +630,7 @@ enum LexicalTokenizerName {
@doc("Grammar-based tokenizer that is suitable for processing most European-language documents. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicTokenizer.html")
Classic: "classic",

@doc("Tokenizes the input from an edge into n-grams of the given size(s). See https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.html")
@doc("Tokenize the input from an edge into n-grams of the given size(s). See https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.html")
EdgeNGram: "edgeNGram",

@doc("Emits the entire input as a single token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/KeywordTokenizer.html")
Expand All @@ -646,7 +648,7 @@ enum LexicalTokenizerName {
@doc("Divides text using language-specific rules and reduces words to their base forms.")
MicrosoftLanguageStemmingTokenizer: "microsoft_language_stemming_tokenizer",

@doc("Tokenizes the input into n-grams of the given size(s). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenizer.html")
@doc("Tokenize the input into n-grams of the given size(s). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenizer.html")
NGram: "nGram",

@doc("Tokenizer for path-like hierarchies. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/path/PathHierarchyTokenizer.html")
Expand All @@ -658,7 +660,7 @@ enum LexicalTokenizerName {
@doc("Standard Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop filter. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/StandardTokenizer.html")
Standard: "standard_v2",

@doc("Tokenizes urls and emails as one token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.html")
@doc("Tokenize urls and emails as one token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.html")
UaxUrlEmail: "uax_url_email",

@doc("Divides text at whitespace. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceTokenizer.html")
Expand Down Expand Up @@ -819,7 +821,7 @@ model ClassicTokenizer extends LexicalTokenizer {
maxTokenLength?: int32 = 255;
}

@doc("Tokenizes the input from an edge into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.")
@doc("Tokenize the input from an edge into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.")
model EdgeNGramTokenizer extends LexicalTokenizer {
`@odata.type`: "#Microsoft.Azure.Search.EdgeNGramTokenizer";

Expand Down Expand Up @@ -1164,7 +1166,7 @@ enum MicrosoftStemmingTokenizerLanguage {
Vietnamese: "vietnamese",
}

@doc("Tokenizes the input into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.")
@doc("Tokenize the input into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.")
model NGramTokenizer extends LexicalTokenizer {
`@odata.type`: "#Microsoft.Azure.Search.NGramTokenizer";

Expand Down Expand Up @@ -1236,7 +1238,7 @@ model LuceneStandardTokenizerV2 extends LexicalTokenizer {
maxTokenLength?: int32 = 255;
}

@doc("Tokenizes urls and emails as one token. This tokenizer is implemented using Apache Lucene.")
@doc("Tokenize urls and emails as one token. This tokenizer is implemented using Apache Lucene.")
model UaxUrlEmailTokenizer extends LexicalTokenizer {
`@odata.type`: "#Microsoft.Azure.Search.UaxUrlEmailTokenizer";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import "@typespec/http";
import "@typespec/rest";

// cspell:ignore adls adlsgen

import "./dataIdentity.model.tsp";
import "./dataPolicy.model.tsp";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ interface TenantOperations
extends ProxyResourceOperations<TestTenantResource>,
ResourceUpdate<TestTenantResource, TestTenantProperties> {}

@doc("rp-specific proeprties for the resource")
@doc("rp-specific properties for the resource")
model TestTenantProperties {
@doc("The status of the last operation performed on this resource.")
provisioningState: ResourceProvisioningState;
Expand All @@ -107,7 +107,7 @@ interface ExtensionOperations
extends ProxyResourceOperations<TestExtensionResource>,
ResourceUpdate<TestExtensionResource, TestExtensionProperties> {}

@doc("rp-specific proeprties for the resource")
@doc("rp-specific properties for the resource")
model TestExtensionProperties {
@doc("The status of the last operation performed on this resource.")
provisioningState: ResourceProvisioningState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface Tracked2Operations {
listBySubscription is ArmListBySubscription<TestTrackedResource2>;
}

@doc("rp-specific proeprties for the resource with all envelope properties")
@doc("rp-specific properties for the resource with all envelope properties")
model TestTrackedProperties2 {
@doc("The status of the last operation performed on this resource.")
provisioningState: ResourceProvisioningState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ model Dependent is ProxyResource<DependentProperties> {
name: string;
}

/** Depedent properties */
/** Dependent properties */
model DependentProperties {
/** Age of depedent */
/** Age of dependent */
age: int32;

/** Gender of depedent */
/** Gender of dependent */
gender: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Microsoft.UpdateTests;

interface Operations extends Azure.ResourceManager.Operations {}

@doc("Widget Resoruce")
@doc("Widget Resource")
model WidgetResource is TrackedResource<WidgetResourceProperties> {
@doc("The name of the widget.")
@key("widgetName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ model AllPropertiesResource is TrackedResource<AllPropertiesProperties> {
interface AllProperties
extends TrackedResourceOperations<AllPropertiesResource, AllPropertiesProperties> {}

@doc("rp-specific proeprties for the resource with all envelope properties")
@doc("rp-specific properties for the resource with all envelope properties")
model AllPropertiesProperties {
@doc("The status of the last operation performed on this resource.")
provisioningState: EnvelopeProvisioningState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ namespace Organization
{
@get op get(@path subscription: string, @path resourceGroup: string, @path name: string) : ArmResponse<Organization>;

@slro("/operations", OperationStatus)
@lro("/operations", OperationStatus)
@put op createOrUpdate(@path subscription: string, @path resourceGroup: string, @path name: string, Organization) : ArmResponse<Organization>;
@patch op update(@path subscription: string, @path resourceGroup: string, @path name: string, OrganizationUpdate) : ArmResponse<Organization>;

@slro("/operations", OperationStatus)
@lro("/operations", OperationStatus)
@delete op delete(@path subscription: string, @path resourceGroup: string, @path name: string) : ArmResponse;

@post op getKeys(@path subscription: string, @path resourceGroup: string, @path name: string) : ArmResponse<OrganizationKeys>;
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/specs/resource-manager/logz/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ model FilteringTag {
@doc("The value of the tag.")
value: string;

@doc("The action associated with thsi tag.")
@doc("The action associated with this tag.")
action: TagAction;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ interface TenantOperations
extends ProxyResourceOperations<TestTenantResource>,
ResourceUpdate<TestTenantResource, TestTenantProperties> {}

@doc("rp-specific proeprties for the resource")
@doc("rp-specific properties for the resource")
model TestTenantProperties {
@doc("The status of the last operation performed on this resource.")
provisioningState: EnvelopeProvisioningState;
Expand Down Expand Up @@ -137,7 +137,7 @@ interface ExtensionOperations
extends ProxyResourceOperations<TestExtensionResource>,
ResourceUpdate<TestExtensionResource, TestExtensionProperties> {}

@doc("rp-specific proeprties for the resource")
@doc("rp-specific properties for the resource")
model TestExtensionProperties {
@doc("The status of the last operation performed on this resource.")
provisioningState: EnvelopeProvisioningState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface Tracked2Operations {
listBySubscription is ArmListBySubscription<TestTrackedResource2>;
}

@doc("rp-specific proeprties for the resource with all envelope properties")
@doc("rp-specific properties for the resource with all envelope properties")
model TestTrackedProperties2 {
@doc("The status of the last operation performed on this resource.")
provisioningState: EnvelopeProvisioningState;
Expand Down Expand Up @@ -86,7 +86,7 @@ interface TenantOperations2 {
listByParent is ArmResourceListByParent<TestTenantResource2>;
}

@doc("rp-specific proeprties for the resource")
@doc("rp-specific properties for the resource")
model TestTenantProperties2 {
@visibility("read")
@doc("The status of the last operation performed on this resource.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ model LinkerProperties {
...DefaultProvisioningStateProperty;
}

@doc("The kmind of authentication used for this linker.")
@doc("The kind of authentication used for this linker.")
enum AuthType {
@doc("System assigned identity")
systemAssignedIdentity,
Expand Down
Loading
Loading